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
hemant ranahemant rana 

How to get personAccount record id by javascript function on a button click

Pramod SharmaPramod Sharma
Hi Hemant,

You can choose one from the below as per your convenience :)

1) If you have apex:form in your visualforce then you can call apex:actionFunction from javascript and rerender the visualforce tag in which we are expecting personAccount Id by apex variable.

http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionFunction.htm

2) Use Javascript Remoting

https://www.salesforce.com/us/developer/docs/pages/Content/pages_js_remoting.htm


MagulanDuraipandianMagulanDuraipandian

http://www.infallibletechie.com/2014/05/simple-ajax-in-salesforce.html

Check this

If this solves your problem, kindly mark it as the best answer.
Hit Like, if it saved your work :-)

Regards,
Magulan
http://www.infallibletechie.com