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
Sai LaasyaSai Laasya 

Is it possible to insert values into an object using onclick Javascript

I have a detail page button on my Opportunity page. I want to use onclick Javascript to capture two date fields called Start Date and End Date. I am able to input the dates using prompt in javascript. Is it possible to insert those dates into the same opportunity record?
Pramod GowdaPramod Gowda
Hi Laasya,

You can use the Ajax toolkit to insert the dates into opportunity fileds.
Please refer the link below.
http://www.jitendrazaa.com/blog/salesforce/create-and-update-records-using-javascript-button-in-salesforce-ajax-toolkit/

Hope it is what you expecting.

Thanks,
Pramod