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
Mathew Thomas 29Mathew Thomas 29 

I have the need to save the value created in JavaScript into a custom field in salesforce on the record page how do I go about doing that!

AnudeepAnudeep (Salesforce Developers) 
Hi Mathew, 

I suggest looking at this example
Mathew Thomas 29Mathew Thomas 29
@anudeep. So I am new to using apex and developing. Just to give you a background. I created a slider component in my visual studio code which I have integrated with my Org. There is a value I generated below the slider which I calculated by taking amount on opportunity page and using the slider value and implemented a formula on them . Now What i want to do is create a custom field value within the opportunity record that will get populated automatically with this value. Would I taking the above example  you suggested into consideration and have to create a apex controller or an apex trigger to do the same?
AnudeepAnudeep (Salesforce Developers) 
The best solution in your use case would be to use action.setParams() in JavaScript to set data to pass to an Apex controller.

I suggest going through this documentation to learn more. You will find a sample code there

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you