1

I'm working on a custom button to appear on a list view for a custom object, and hitting a roadblock. I've tried a few different variations but keep getting a little sad Javascript icon instead of the expected edit page.

I've checked list button and display checkboxes, and then here's my URL:

/{!Custom_Object__c.Id}/e?&retURL=%2F{!Custom_Object__c.Id}&Custom_Field__c=Avory+Faucette

Custom_Object__c is my object's API name and Custom_Field__c is the name of the field I want to be populated with my name on the edit page. Ideally, I'd also have the record save on its own with this button, but I'm just trying to get step 1 to work first!

1
  • What is the field type of Custom_Field__c? Also, drop the ampersand before retURL. The ? marks the start of the query string, and the ampersands are needed in between parameters, but not at either end. Plus what Eric said about the field ID instead of name. Commented Oct 31, 2014 at 0:26

1 Answer 1

1

You actually need to use the LKID for the field on the page itself. This is different for every org so hardcoding is not the best way to go (Although in this case it IS the easiest).

Here is a post relevant to your question. Look at mattandneil's answer.

So your url would look something like

/{!Custom_Object__c.Id}/e?retURL=%2F{!Custom_Object__c.Id}&00N000000000000AAA =Avory+Faucette

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .