You need to sign in to do that
Don't have an account?
Jerry Clifft
Adding a LEFT to ApexPages.currentPage().getParameters().get('oppId');
I have a visualforce page and controller, part us which grabs "oppid" from the url and inserts it as part of the record.
a.Opportunity__c = ApexPages.currentPage().getParameters().get('oppId');
This works fine, if I have a URL such as:
salesforce.com/oppid=000013456789123
But sometimes, I get a URL such as:
salesforce.com/oppid=000013456789123?srPos=0
I would like to strip off everything after oppid=(first 15 chars). I was thinking about using something like LEFT,15 to do it. I have yet to get the formating right. Any suggestions?
a.Opportunity__c = ApexPages.currentPage().getParameters().get('oppId');
This works fine, if I have a URL such as:
salesforce.com/oppid=000013456789123
But sometimes, I get a URL such as:
salesforce.com/oppid=000013456789123?srPos=0
I would like to strip off everything after oppid=(first 15 chars). I was thinking about using something like LEFT,15 to do it. I have yet to get the formating right. Any suggestions?
Abhinav Gupta
Not sure how this is happening by normal salesforce generated urls, you could try substring in apex i.e.