You need to sign in to do that
Don't have an account?
Adelchi Pelizzo
Ajax toolkit
I am trying to get a handle on this Ajax Toolkit.
I am referring to this example https://developer.salesforce.com/docs/atlas.en-us.ajax.meta/ajax/sforce_api_ajax_vf_sample.htm
I do not understand where GETSESSIONID() is coming from here, can someone point me in the right direction?
I am referring to this example https://developer.salesforce.com/docs/atlas.en-us.ajax.meta/ajax/sforce_api_ajax_vf_sample.htm
I do not understand where GETSESSIONID() is coming from here, can someone point me in the right direction?
<apex:page > <script type="text/javascript"> var __sfdcSessionId = '{!GETSESSIONID()}'; </script>
then what your browser will actually see is
so every call will alert with the same 'now' time.
Because of this mail merge approach you should probably be careful to wrap the values using JSENCODE, HTMLENCODE, JSINHTMLENCODE.
All Answers
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_variables_functions.htm
This means I can use those funtions in any javascript on a visualforce page?
On the document says: Use functions to transform data from records, perform calculations, or to provide values for Visualforce attributes.
then what your browser will actually see is
so every call will alert with the same 'now' time.
Because of this mail merge approach you should probably be careful to wrap the values using JSENCODE, HTMLENCODE, JSINHTMLENCODE.