+ Start a Discussion

Custom Button Hack Help



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: 


 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. 






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