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
E_rockE_rock 

Custom Button for a new Case

A prior administrator created a custom button on the Contact object to create a new Case from the Contact Page layout.  The objective was to auto populate Contact and Account information when creating a new Case.  The code began this way 'https://na4.salesforce.com/500/e?retURL=%2F&cas4_lkid={!Account.Id}&cas3_lkid={!Contact.Id}&.........'  It works great, and recently we discovered an unwanted side effect.  If you click the 'Cancel button before saving the case, the user gets logged out of the SFDC instance.  A SFDC customer service representative told me it was becsause the code was hard coding a URL string into it, in essence 'hacking into our instance' causing the log out on the 'Cancel'.

 

Can anybody tell me a way around this or another approach in creating a new Case and autopopulating the fields with Accouont and Contact information?  Any assistnace is most appreciated.

TrimbleAgTrimbleAg

Hmmm....

 

Pretty sure this is just standard stuff really, no custom button required.

 

If you are on a contact page, just either hover over the "case" section at the top of the screen and click "new" or go down to the related list itself and hit "new". Since you are doing it with an exsisting contact that already has an established account, it will populate both fields automatically.

 

PB

 

 

E_rockE_rock

@TrimbleAg,

 

Thanks, but we took the standard 'New Case' button off the Contact page layout by choice.  It does in fact tie the contact/account to the case, but that is all.  Our needs were to auto fill in many other fields so our service reps would not have to.  We created the custom button, which in fact does fill in all of the fields that we need it to.  The exception is when someone goes to Cancel, and it logs them out. 

TrimbleAgTrimbleAg

E_Rock,

 

What other fields are you trying to pass? It would have to be a custom field?

 

The standard button should also pass the phone numbers and e-mail addres natively too.

 

Thanks,
PB

E_rockE_rock

TrimbleAg,

 

Yes Custom fields.  I have actually figured out the issue.  There was a bug in the code where the ID was not there for the return code.  that was casuing the logout.  Problem solved.