I have a question regarding populating a field (Field 'fieldtest' whose Id is 00H280000073992) in a custom object (ContactDetail__c). I used the URL hack tip, and it works.
{!URLFOR($Action.ContactDetail__c.New, null, [Name='testname', 00H280000073992='test'])}
However, I'm wondering if the use of the Id in the formula can be dangerous when the org is deployed to another environment.
When I use the name of the field :
{!URLFOR($Action.ContactDetail__c.New, null, [Name='testname', fieldtest='test'])}
The field 'fieldtest' is not populated.
Update - In Reponse to Tushar's Answer Thanks Tushar, I created a hierarchical CS.
IdLabel__c.ContactId__c = 00H280000073992
However, I'm having trouble including it in my formula.
First, I tried :
{!URLFOR($Action.ContactDetail__c.New, null, ["Name"="testname", "Test"=$Setup.IdLabel__c.ContactId__c])}
Result :
URL : Name=testname&Test=00H280000073992 (good but I need inversion)
However, when I try :
{!URLFOR($Action.ContactDetail__c.New, null, ["Name"="testname", $Setup.IdLabel__c.ContactId__c="test"])}
Syntax check fails :
Error: Syntax error. Missing Unknown token: 23
Finally, with :
{!URLFOR($Action.ContactDetail__c.New, null, ["Name"="testname", "$Setup.IdLabel__c.ContactId__c"="test"])}
I got :
URL : Name=testname&%24Setup.IdLabel__c.ContactId__c=test
Thanks for your answer
$Label
in key/value pairs like that.