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
DharshniDharshni 

How to get field-ID dynamically?

I am trying to prepopulate values in a standard page using field-IDs. I have hard-coded the field-ID. I am not sure - if when I move the code to other orgs/package it, will the field-ID work? Is there anyway I can get the field-ID dynamically?

 

The link which I use currently is : 

 

onclick="window.parent.location.href='/a0U/e?CFxxxxxxxxxxxxxxx={!account.Name}&CFxxxxxxxxxxxxxxx_lkid={!account.Id}&retURL={!account.Id}'"

 

Any ideas on this would be really helpful.

 

Thanks.

 

 

Srikant JoshiSrikant Joshi

Hi..

 

Use custom labels for this.So the custom label with same name will have different values one in Sandbox and other in production.

 

 

Regards,

joshisrik@gmail.com