You need to sign in to do that
Don't have an account?
shra1_dev
REG: Problem in retireving the parent Id in Javascript on Detail Page Button
Hi,
I have created a Detail Page Button Child__c object. For that I was using an Onclick javascript.
In that javascript I have given:
var ParentId = "{!Child__c.Parent__c}"; //where Parent__c is the lookup to the Parent__c object
alert(ParentId);
Alert prints the Parent Record "Name" where I was expecting the "ID". Why it is taking the Name? How to retrieve the Id without querying the object?
Please help me...
Regards,
Shravan
Check this:
All Answers
Check this:
Thanks Rahul.. It has worked...
But what happens if I have ParentId__c(of type text suppose) also as a field in the Child__c object? Then how to retrieve the ParentId__c field
Regards,
Shravan
Hi Shravan,
Glad to know its resolved..
If you have a Text field with same name, Still it will show give the Id of Lookup Field instead of the value of Text field.
That means Id will overide the Text Field!