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
Rakesh SRakesh S 

How to get default Prepopulate Fields on a Standard Edit page

Hi All,
I want to Prepopulate Fields on a Standard Edit page. How we can do that ?
Every time display only default value for any appointment like " SRManagement " for Organization. 
User-added image
then i tried using custom button through url. It looks like working but getting some error like
User-added image
Standard button url is: /a03/e?CF00N1a000006x8Xb=Gloria+Hejduk&CF00N1a000006x8Xb_lkid=a021a000003HpXA&retURL=%2Fapex%2FPatientView%3Fid%3Da021a000003HpXA%26sfdc.override%3D1.

My custom button url like this: /a03/e?CF00N1a000006x8Xb={!Patient__c.Name}&CF00N1a000006x8Xb_lkid={!Patient__c.Id}&CF00N1a0000077UQp=SRManagement&retURL=%2Fapex%2FPatientView%3Fid%3D{!Patient__c.Id}%26sfdc.override%3D1.

Please help me with appropriate solution. 
I appriciate your response.

Thank you.
Rakesh.S
Best Answer chosen by Rakesh S
Rahul SharmaRahul Sharma
Add the parameter for Organization lookup with _lkid parameter for that field, make sure to pass the valid record Id-
/a03/e?
CF00N1a000006x8Xb={!Patient__c.Name}&
CF00N1a000006x8Xb_lkid={!Patient__c.Id}&
CF00N1a0000077UQp=SRManagement&
CF00N1a0000077UQp_lkid={!OrganizationId}&
retURL=%2Fapex%2FPatientView%3Fid%3D{!Patient__c.Id}%26sfdc.override%3D1

 

All Answers

Rahul SharmaRahul Sharma
For populating the Lookup field, you need to set the label and value both fields. Seems like you are only setting the label.
Rakesh SRakesh S
How can i set value field and where can i put it. Please help me with brief information.


Thank you.
Rahul SharmaRahul Sharma
Add the parameter for Organization lookup with _lkid parameter for that field, make sure to pass the valid record Id-
/a03/e?
CF00N1a000006x8Xb={!Patient__c.Name}&
CF00N1a000006x8Xb_lkid={!Patient__c.Id}&
CF00N1a0000077UQp=SRManagement&
CF00N1a0000077UQp_lkid={!OrganizationId}&
retURL=%2Fapex%2FPatientView%3Fid%3D{!Patient__c.Id}%26sfdc.override%3D1

 
This was selected as the best answer