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
verynewbieverynewbie 

Custom button to open Custom object by Page

Hi..

I am kindoff confused with this.

Any help please.....!!!!!

 

I have a req where I need to create a custom button on standard object.Lets suppose it as account.

I have a custom object called Candidate__c which has account look up.

I have to create a custom button on Account..which when clicked,opens candidate__c edit page with account data pre populated.

I created a VF page but not able to access on account button creation.

I also set standardcontroller Please help..Any sample snippet...I need this ASAP!!!

Thanks

 

Saikishore Reddy AengareddySaikishore Reddy Aengareddy

I dont think you will need visualforce page here to create a button for populating the edit page of the cadidate...

 

1. Create a button of type Detail page button, content source = URL, Behaviour=Display in existing window without sidebar or header.

2. Add something like..

 

/a0G/e?CF00NE0000004opCZ={!Account.Name}&CF00NE0000004opCZ_lkid={!Account.Id}&00NE0000004opCe={!Account.Name}

 

a0G -> candidate object prefix, 

e -> edit mode

CF00NE0000004opCZ={!Account.Name}&CF00NE0000004opCZ_lkid={!Account.Id} -> to populate lookup field if you want to..

 

for more information follow this link..

 

http://raydehler.com/cloud/clod/salesforce-url-hacking-to-prepopulate-fields-on-a-standard-page-layout.html

 

 

http://threeheadsonapike.wordpress.com/2013/02/11/salesforce-url-hacking-prepopulating-fields/

verynewbieverynewbie
Ya..I did this.But it is org specific .Thats the reason why we are changing it. and decided to use VF page..please help!!!!
verynewbieverynewbie
Thanks for the link sir.But i didn't understand it.i Want the button on Account layout.Its like replacing related list with custom button.Please help me in understanding this.Thanks