You need to sign in to do that
Don't have an account?
Custom Button - Pre-Populate Name (text) Field of a Custom Object
I have the following Button below that opens a page to add a new record for "Drugs__c". It pre-populates the Account field on the page, but I also want to auto populate the DrugsName (Name (text)) field with the following text, "default". I dont want our users to worry about filling in this field since it will be overrided with a naming convention using Workflow/FieldUpdate once the record is saved.
Highlighed in red is the id of the field name, "Drugs Name" in the custom object "Drugs__c". The code is not working properly and not populating the Drug Name field. Suggestions how to correct this.
/a0J/e?CF00NZ0000000etH2={!Account.Name} & CF00NZ0000000etH2_lkid={!Account.Id}&retURL=%2F{!Account.Id}&01IZ00000008qBS="default"
jpben,
The url parameter to be passed must be HTML Id( of InputField) of the field grabbed from edit screen.
So, for standard field it is same as field name, I believe(Need to check).
Try below code:
If it doesn't work then try replacing it with exact parameter name.
All Answers
jpben,
You do not need to put the text default in quotes.
Try code as below:
Removing the quotes did not work. The field that I am trying to update is the "Name" field on the custom object. I believe this is a standard field that could either be a text or an auto number. I selected text for this custom object. I know that if it is a custom object you put CF before the field id. Is there a different process if it is a standard field?
jpben,
The url parameter to be passed must be HTML Id( of InputField) of the field grabbed from edit screen.
So, for standard field it is same as field name, I believe(Need to check).
Try below code:
If it doesn't work then try replacing it with exact parameter name.
Thanks Rahul. That solved it.