Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2020-03-11 04:49 AM
Hi,
We recently upgraded our Archer environment from 6.3 to 6.6 p6 and after upgrade one of our custom code is not working as expected. Basically when we are clicking the code, its taking to the home page of Archer instead of selecting relevant controls which the code is supposed to do.
I know RSA had changed the way certain protocols work after 6.3 like you can no longer find record id in the URL.
Any advise on this would be greatly appreciated.
Thanks
2020-03-11 07:30 AM
Hi Gaurav
Can you post the custom object? Without seeing it there's very little I can do to help.
Advisory Consultant
2020-03-11 07:38 AM
Hi David Thank you so much for the response. Here you go with the custom code:
<script type="text/javascript">
var RiskProfileId=XXXXX;
var SuggestedOwnerId=XXXXX;
var IRMBusinessId=XXXXX;
function getTrackingID5() {
var TrackingID =document.getElementById("master_DefaultContent_rts_s3336_fXXXXXc").innerHTML;
var RiskProfile=ArcherTech.UI.GenericContent.GetInstance().getFieldValue(RiskProfileId, false);
var SuggestedOwner=ArcherTech.UI.GenericContent.GetInstance().getFieldValue(SuggestedOwnerId, false);
var IRMBusiness=ArcherTech.UI.GenericContent.GetInstance().getFieldValue(IRMBusinessId, false);
var Empties = new Array();
if(RiskProfile==null || RiskProfile=='') {Empties.push("-Risk Profile");}
if(SuggestedOwner==null || SuggestedOwner=='') {Empties.push("-Suggested Control Owner");}
if(IRMBusiness==null || IRMBusiness=='') {Empties.push("-IRM Business Unit");}
if(Empties.length) {
var manfields = new String("The following field(s) are required:\n");
for(var i=0; i<Empties.length; i++) { manfields += '\n' + Empties; }
alert(manfields);
}else{
if (TrackingID !=null && TrackingID !='' && TrackingID !=' ' && TrackingID !=' ') {
var animationOptions1 = ArcherTech.UI.GenericContent.GetInstance().get_loadingAnimationOptions();
$('body').loadingAnimation({ title: '', text: ' Please wait, processing... ', image: animationOptions1.image });
setTimeout(function() {
var str_sub = TrackingID.substring(TrackingID.lastIndexOf("-")+1,TrackingID.length);
window.location.href = 'https://<URL>/custom_app/wfrmLogon.aspx?UserType=R&OptionID=4&TrackingID=' + str_sub;
if (debugging1) console.log("Control Auto Selection Completed");
$.fn.loadingAnimation.remove();
},0);
}
else{
if (TrackingID==null || TrackingID=='' || TrackingID==' ' || TrackingID==' ')
alert ("Please save\\apply the record");
}
}
}
</script>
<div id="bsubmit" style="float: center;padding: 10px;">
<input id=”btnsubmit3” class=control style="font-weight: bold; font-size: 12px; width: 200px;height: 30px;background-color=#DAA520" onclick=getTrackingID5() type=button value="Start Auto Control Selection" name=generatecntrls >
</div>
</div>
2020-03-11 09:10 AM
Thanks.
I only see one line for the redirect to a different site and nothing about taking Archer back to the home page.
Some advice, take a look at my doc, The Horror's of Moving Custom Objects from One Environment to Another. This should help with removing the hard coding of the field ids.
To get the tracking id of the record, just use getRecordId() function instead.
Also the getFieldValues() function only works for date and values list fields.
Advisory Consultant
2020-03-12 01:23 AM
Thanks David,
Field Ids should not be an issue as we did not do packaging or any activity that will change field Ids and this was the upgrade to 6.6 from 6.3.
2020-03-12 08:39 AM
Yes, put field ids do potentially change from one environment to the next.
The other suggest changes fix the issue?
Advisory Consultant
2020-03-12 11:31 AM
Hello David -
The issue is with redirection of https://<URL>/custom_app/wfrmLogon.aspx URL that we are trying to navigate thru the web browser or via Custom Object. It is been redirected to the home page of Archer in the new version of Archer 6.6 P6
As started above, ideally the redirection should happen by putting the URL in web browser and should route to external asp.net application/page wfrmLogon.aspx which is using the same IIS and web server, but this is not happening currently.
Your help is much appreciated.
2020-03-12 03:47 PM
Try replacing this line,
window.location.href = 'https://sww-collective-dev-project.shell.com/custom_app/wfrmLogon.aspx?UserType=R&OptionID=4&TrackingID=' + str_sub;
With,
window.location.replace = 'https://sww-collective-dev-project.shell.com/custom_app/wfrmLogon.aspx?UserType=R&OptionID=4&TrackingID=' + str_sub;
Advisory Consultant
2020-03-13 12:51 AM
Hi David,
Both the links look similar.
Did you miss something?
Thanks
Rohit