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
gmc74gmc74 

Opening two URLs from one Button

Hi everyone,

I currently have a button on a case that will change a handful of fields so that the user can "Take" the case.  I have a separate button that the user can run which will change their status to "In Office" (a custom field on the user record).  I would like to do both of these when they click a single button, any suggestions?

Currently I am using URLs

1)https://na2.salesforce.com/{!Case.Id}/e?retURL=%2F{!Case.Id}&cas7=Taken&CF00N40000001VTQJ_lkid={!User.Id}&save=1
2)https://na2.salesforce.com/{! User.Id}/e?retURL=%2F{!User.Id}&00N40000001VsGs="In%20Office"&save=1

Any suggestions would be appreciated.

Thanks

Grant
thought_currythought_curry
I think you cannot display both the user and the case page simultaenously on click on one button!
 
You can probably update the user field & case field using AJAX tool kit in the S-Control that you are attaching to the button and then display the case detail page.
sfdcfoxsfdcfox
You certainly can. The trick is to use the retURL to achive this. For example:
 
Code:
/{!Case.Id}/e?cas7=Taken&CF00N40000001VTQJ_lkid={!User.Id}&save=1&retURL=%2F{!User.Id}%2Fe%3FretURL%3D%252F{!Case.Id}%2600N40000001VsGs%3DIn+Office%26save%3D1

Basically, I encoded the second retURL for the first, so that the case will be updated, the user will be modified, and finally the user will re-appear on the case detail.