You need to sign in to do that
Don't have an account?

Who am I?
Hi,
I'm writing a button on a Case page that
1. gets some values from the local Case:
2. Puts them into an Apex call to create a different object.
3. should write some stuff back into the local case, so
I'm writing a button on a Case page that
1. gets some values from the local Case:
var name = "{!Case.Subject}";
2. Puts them into an Apex call to create a different object.
3. should write some stuff back into the local case, so
{!Case.Project__c} = project;
...which does not work.
So what is the way to set the local record's fields in Javascript?
Thanks!
Cheers,
Thorsten
You need to use the AJAX Toolkit. Set the detail button to execute a bit of javascript on click.
Reference : http://www.salesforce.com/us/developer/docs/ajax/index.htm
Refer this link (http://www.jitendrazaa.com/blog/salesforce/create-and-update-records-using-javascript-button-in-salesforce-ajax-toolkit/)
So, in summary its either the AJAX Toolkit or Apex, nothing else is possible.
Hope this helps !!
--
Thanks,
Swayam
All Answers
You need to use the AJAX Toolkit. Set the detail button to execute a bit of javascript on click.
Reference : http://www.salesforce.com/us/developer/docs/ajax/index.htm
Refer this link (http://www.jitendrazaa.com/blog/salesforce/create-and-update-records-using-javascript-button-in-salesforce-ajax-toolkit/)
So, in summary its either the AJAX Toolkit or Apex, nothing else is possible.
Hope this helps !!
--
Thanks,
Swayam
Thank you very much!