You need to sign in to do that
Don't have an account?
Jeff Susich
Prepopulating a Field during record creation
I have a custom object that has a master-detail relaionship with Opportunities. The custom object is called "Invoices". I want to prepopulate some fields in the "Invoices" record using a custom button.
The ID of the currency custom field on the Opportunity that I am interested in is 00N50000002UECs. I want to have the value in this currency field prepopulate to my custom field 00N50000002UECe on my custom object when I create a new record.
I am having trouble referencing the Opportunity field in my URL so that it prepopulates the custom field on my custom object.
My button URL code is the initlal standard URL plus &00N50000002UECe=00N50000002UECs
This results in the text value "00N50000002UECs" prepopulating in the field. How do I reference the field that is on the Opportunity that is related to the custom "Invoice" object?
The ID of the currency custom field on the Opportunity that I am interested in is 00N50000002UECs. I want to have the value in this currency field prepopulate to my custom field 00N50000002UECe on my custom object when I create a new record.
I am having trouble referencing the Opportunity field in my URL so that it prepopulates the custom field on my custom object.
My button URL code is the initlal standard URL plus &00N50000002UECe=00N50000002UECs
This results in the text value "00N50000002UECs" prepopulating in the field. How do I reference the field that is on the Opportunity that is related to the custom "Invoice" object?
You need to pass the actual value of the Currency custom field instead of the ID of the field. I've written a series on this - check it out and keep it as a reference for any other fields you are trying to pass in the URL.
http://writeforce.blogspot.com/2012/12/prepopulating-fields-using-url-hacking.html
Let me know if this helps.
--Saurabh.
All Answers
You need to pass the actual value of the Currency custom field instead of the ID of the field. I've written a series on this - check it out and keep it as a reference for any other fields you are trying to pass in the URL.
http://writeforce.blogspot.com/2012/12/prepopulating-fields-using-url-hacking.html
Let me know if this helps.
--Saurabh.
When I inspect the element with the field I want to populate I get "input id ="00N50000002UECe" name ="00N50000002UECe". When I try and use the logic ".....&00N50000002UECe=00N50000002UECs" I get the text 00N50000002UECs in the field. I'm not telling salesforce that this field is on the Opportunity object, not on the custom object record I am creating.
Any ideas appreciated.
for e.g., I assume that you are creating a custom button or link. When you construct the URL, it should look something like this -
This will pass in the text of the currency field in the URL, instead of the ID of the currency field. Let me know if this works.