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

Urgent!!How to store javascript value to salesforce database!
Hi
I calculate the value in <script> </script> i.e javascript and that value has to be store in custom field wen a record is created without button can any one help this plzzz.
Regards,
Rajesh.
You could use an actionfunction - that allows you to tie a controller method to a javascript function, and you can pass the value as a parameter. Also, there's javascript remoting which would allow you to call a controller method and pass the value directly to that in an asynchronous fashion.
Hi Bob,
Thanks for ur valuable suggestion can u post reference example for it so that i can implement in my sandbox.
Thanks,
Rajesh.
You can define the actionfunction like so:
invoke this using :
and in your controller have:
and the searchString will be populated with the value from the page by the time that doSearch is executed.
Hi Bob,
This is my requirement
In vf page <script> i Calculate distance and store in disc</script>
and now wen an account record is created it has to get that value in DiscBetween__c Account custom field.
Plz solve this issue.it's very urgent.
Regards,
Rajesh.
You can use the code samples I gave above to achieve this. I'm not going to write the code for you I'm afraid.
Hi
Thanks for ur valuable suggestion can u post onne example in this which should have vf page with javascript value and controller on standard object.Plz.ASAP.Urgent.
Thanks,
Rajesh.
I'm afraid I don't have example code of that nature to post. I'm happy to help you if you have a go and hit problems.
Hi...
i am facing a similar problem as you have posted ...
i am calculating a value in javascript and want to assign it to a custom field
can u please help me with an example.... its urgent
thnx