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
Ritika JRitika J 

Prepopulate Fields on a Standard Page

Hi ,

 

I have a requirement where i  am routing user from a vf page to standard case creation page , i need to prepopulate some fields on case while routing.

 

Any idea how to do this .

 

Thanks

Ritika

Best Answer chosen by Admin (Salesforce Developers) 
Abhay AroraAbhay Arora

use customlabels for ids and you can keep this as part of manuall activity after deployment

All Answers

SRKSRK

TO populate the fields in standard  page u need to find the id & name of the fields which u want to populate in standard page

for example i want to populte 2 fields who id is salesfrocefieldID1 & salesfrocefieldID2
then in u r URL add the paramter

<U r URL>?salesfrocefieldID1 =  "<Value>" & salesfrocefieldID2 =  "<Value>"

u can find  out the ID from view sorce code

 

& if the field is lookup field the pass 2 paramete salesfrocefieldID1 = "<Name of record>" & salesfrocefieldID1_lkid =  "<ID of
record>"

 

Ritika JRitika J

Hi

 

Thanks  for the reply , problem is i dont want to hard code the id ....as it will create issue while migration ....can we query these ids....

Abhay AroraAbhay Arora

use customlabels for ids and you can keep this as part of manuall activity after deployment

This was selected as the best answer
SRKSRK

U can create custom seeting where u put these ID's

& query them in u apex class

& and u move u r code to production chages these ID's only in custom seeting

& once u move u r object into production & next time when u refresh the sandbox these ID's will not chage thay remain same as of production (it simple mean that after fist deployment & refresh u do not need to chage these id's anywhere)