You need to sign in to do that
Don't have an account?
Semira@gmail.com
Unable to Access Page
Hi, I have this piece of code running. I'm trying to set the record type of a child object by using condition to look at a field value of parent.
Eg. Job division = content, Recordtype of work order = restoration.
job division = other, Recordtype of work order = environmenta.
I have this in my pagereference but the parameter does not run correctly. I'm not sure how else should I be defining the parameters.
This is the error I'm getting:
Unable to Access Page
The value of the "id" parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information.
Eg. Job division = content, Recordtype of work order = restoration.
job division = other, Recordtype of work order = environmenta.
I have this in my pagereference but the parameter does not run correctly. I'm not sure how else should I be defining the parameters.
public PageReference redirect(){ String prefix = Work_Order__c.SObjectType.getDescribe().getKeyPrefix(); String param = getParameters()+'&RecordType={!IF(Ispickval(Job_Number__c.Division__c,content),012Q00000000kxB,012Q00000000kxG)}'; return new PageReference('/'+prefix+'/e?nooverride=1&'+param); }
This is the error I'm getting:
Unable to Access Page
The value of the "id" parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information.
Please refer below code.
In this line,
if(Job_Number__r.Division__c=='content')
replace Job_Number__r with the instance of Job_Number.
Regards
Mohit Bansal
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help
All Answers
Please refer below code.
In this line,
if(Job_Number__r.Division__c=='content')
replace Job_Number__r with the instance of Job_Number.
Regards
Mohit Bansal
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help