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
AdrielleSFDCAdrielleSFDC 

Custom Button Hack Help

Hello, 

 

I used a hack to create a custom button to my 'sample request' custom object. The new button lives on my account page. 

 

Here is the code I am using: 

{!Sample_Request__c.Id}/a1Y30000000hHgO/e?clone=1&retURL=%2F{!Sample_Request__c.Id}

 Now the button works except for these two issues:

 

1) It's cloning (since I used a bit of cloned code to hack it) the account, and I need the account to populate (whichever act the user is on when they click 'sample request). 

2) I need the 'name' to be 'null' or blank. I could even see replacing the 'name' with an auto number, like cases do, since naming the request will not be important. 

 

http://postimg.org/image/xi682bitv/

 

http://postimg.org/image/9jj7np7o3/

 

Here is a pic where the button lives, and a pic of the mock-up of the form that the button will create. Any help would be greatly appreciated!!! 

 

 

Tim BarsottiTim Barsotti

I would drop the cloning feature and just pass in your Account Name. This can be accomplished by using something like this: http://stackoverflow.com/questions/10437326/how-to-prepopulate-a-standard-lookup-field-in-a-standard-object