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
Chris BenenatiChris Benenati 

url arguments in detail page button

I am looking at some some detail page buttons that were coded by a long-gone Salesforce admin.
 
One is for behavior “Display in existing window without sidebar or header”, and the Button URL is defined as:
 
/{!$ObjectType.Contact}/e?
        CF00NU0000003Ibi4={!hhs__Households__c.Name}
        & CF00NU0000003Ibi4_lkid={!hhs__Households__c.Id}
        & CF00NU0000003IbiH={!hhs__Households__c.hhs__Screening_ID__c}
        & CF00NU0000003IbiH_lkid={!hhs__Households__c.hhs__Screening_IDId__c}
        & RecordType=012U0000000QB2I
        & retURL=/{!hhs__Households__c.Id}
 
Another is for behavior “Execute JavaScript”, and the OnClick Javascript is defined as:
 
window.location =
        "/{!$ObjectType.Contact}/e?
            00N1a000003CYdw={!Household__c.Name}
            & 00N1a000003CYe6={!Household__c.Id}
            & RecordType=0121a000000LHEw
            & retURL=/{!Household__c.Id}";
 
I am assuming that the long cryptic alphanumeric strings are field and record identifiers.
 
How were they arrived at, and how can I find out exactly what records/fields the refer to?
 
Best Answer chosen by Chris Benenati
Chris BenenatiChris Benenati
Im fact, the field/record/object for a given fieldID can generally be determined by browsing to the URL composed by appending /<fieldID> to your organization's base URL.  If the field ID starts with "CF", remove the "CF" before appending it.

All Answers

pconpcon
These are the field identifiers.  Take a look over these two posts [1] [2] to see more information about them.

[1] http://raydehler.com/cloud/clod/salesforce-url-hacking-to-prepopulate-fields-on-a-standard-page-layout.html
[2] http://www.salesforceben.com/salesforce-url-hacking-tutorial/
Chris BenenatiChris Benenati
Thanks.

So there is no way to find out what field the ID in the Button code refers to, short of searching through all the possible target fields?  The writer of the code really should have included comments identifying them.  I have to redeploy to a new org where the IDs will be different.
pconpcon
No, there is no programatic way to get these field names from the Ids.
Chris BenenatiChris Benenati
Im fact, the field/record/object for a given fieldID can generally be determined by browsing to the URL composed by appending /<fieldID> to your organization's base URL.  If the field ID starts with "CF", remove the "CF" before appending it.
This was selected as the best answer