0

I have a Geolocation field on the Quote, and I'm using a custom button to open the Case Creation page, and pre-populating data via the URL hack. I'm not having any luck using the Geolocation field from the quote to populate the corresponding Case Geolocation field. This Geolocation field on Case is required. I have written code to update the Geolocation field on the Case before the record is inserted, but because the field is required, it can't be blank when Save is clicked in the UI.

Can someone help me by working on the URL Hack?

Can someone help me by figuring out how to make the field required after the record is inserted (is a validation rule the only way)?

Is it possible to not show and require the field on creation, but require it and show it after insert, and on any update?

Thanks in Advance!

1

URL hacks are fairly easy. You just need to reference the ID from the page in the URL. Here's an example of the standard URL when creating a case with a specific record type: 500/e?retURL=%2F500%2Fo&RecordType=012500000009uny&ent=Case

e? = edit page

retURL = url to return user to (URL Encoded) use http://meyerweb.com/eric/tools/dencoder/ for help encoding a special URL

Recordtype = recordtype ID (not required, that's only if you have multiple record types)

ent = entity reference (here it is cases, if we were doing opportunities it would be ent=opportunity)

Now if you want to add custom fields to pre-populate when the user clicks a button then append '&' after case and add the ID of the field.

(using Chrome) Now the ID of the field is found by right clicking and inspecting the field on the edit page of that object. For this one we are using the case object so we want to navigate to cases and click 'new'. Now you're in the new page you'll go to your field and right click you'll get something that looks like this: (for custom fields)

<input id="00N50000003N3EX" name="00N50000003N3EX" size="20" tabindex="8" type="text" value=""> 

copy that ID 00N50000003N3EX into the URL and =

after that you can set it to anything.

I set mine to {!Opportunity.amount} because I put my button on the opportunity page.

Now my URL for the 'New Case' button is: /500/e?retURL=%2F500%2Fo&RecordType=012500000009uny&ent=Case&00N50000003N3EX={!Opportunity.Amount}

which will populate that custom field on the case with the amount from the opportunity when the user clicks the button. ALSO make sure that button is set to 'Display in new window'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.