You need to sign in to do that
Don't have an account?
steven75
Custom field populate from URL parameters.
Hi,
I am trying to populate a Custom Field name "Opportunity" in Case, but capture the passing parameters on the URL. The URL above has Opportunity__C=Opt1, so basically, I want to populate "Opt1" value in the custom field name Opportunity in the new Case.
Thank you,
Hi,
Instead of giving "Opportunity__c = Opt1" , use the Id of the Opportunity custom feild.
For eg. /a0F/e?00NR0000000ZqY1={!Opportunity.Name} - where "00NR0000000ZqY1" is Id of the Custom Opportunity feild.
If the Opportunity custom feild is lookup then use, "CF00NR0000000ZqY1"
Hope this helps.
Thanks
Sureka
string Opportunity_1 = ApexPages.currentPage().getParameters().get('Opportunity__C');
This can get the parameter's(opportunity_c) value...
Thank you both for replied on this.
I am new to Salesforce so can you please show me quick steps how to do this.
So I have a created new Case button with this code to pass the Opportunity.ID to the new Case page when I clicked.
/500/e?retURL=%2F500%2Fo&def_opportunity_id={!Opportunity.ID}
After the button clicked, it goes to new Case page, and the URL will be like this.
https://na7.salesforce.com/500/e?retURL=%2F500%2Fo&def_opportunity_id=006A0000003FnpU
In my new Case page has a textbox called "Opportunity", how can I capture "006A0000003FnpU" then populate in the field name Opportunity with an Opportunity.Name? Where can I put "string Opportunity_1 = ApexPages.currentPage().getParameters().get('Oppor tunity__C');"? do I have to modify some standard class for the Case?
Thank you,
You can look at this series of posts for a better explanation on passing parameters via URL.