function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MiguelSeabraMiguelSeabra 

Pre-populating with custom link

Hello once again...

I've been searching in this discussion forum and in others but wasn't able to find an answer to my question...

This is my problem... I have Accounts and Opportunities

I want to build a link in the account area that can pre-populate some Opportunity  fields. I've been able to do that, to some extent, but there is one thing that I can't figure out... I have a picklist in the opportunities section, that I want to have it set with a specific value. The problem is that, that picklist is custom also, and I can't seem to get its ID or reference in order to pre-populate it with a value of my choice... neither can I find the ID/Reference of the values it possesses...

I know it has to be something like:

https://emea.salesforce.com/006/e?retURL=%2F006%2Fo&opp4={!Account.Name}&opp4_lkid={!Account.Id}&00N200000010C52={!Account.Gestor_Cliente__c}

Is there any way to find the ID/reference (like "00N200000010C52") of a custom pick list and its values??

Thank you.

M.
ysmjustinysmjustin
You can use the DOM Inspector add-on for Firefox to find the id of a specific form element.

I'd like to think there's a better way to find the id of a form element within Salesforce, but as you've seen, it's not as simple as viewing the source.
 
It sounds like we're doing some similar Salesforce customizations. I'm trying to populate a series of input fields with default values based on the selected value from a picklist. I can't quite figure out how to do this entirely on the client-side, since I can't attach an onChange event to the specific picklist.
 
Do you have any advise on how to handle this?
ysmjustinysmjustin
Actually, after viewing the source for my lead page, I realized that all fields have a label associated with them. The ID of the picklist will be the "for" attribute of the associated label tag.