1

I am primarily a JavaScript dev that is helping with our Salesforce team. So assume that I'm a newbie with Salesforce. This might even be a silly question, so please tell me if it is. The situation is there is a microsite that is primary there as a form. One of the form questions is to select a session that they want to attend. I need to check if the session is still open. Just a simple boolean that is sitting on the Data extension. They want to do this asynchronously, hence why I'm helping, and I have no idea how to reference a data extension.

  • Welcome to SFSE! Can you expand on this a little? It's a little vague! – Matt Lacey Feb 27 '17 at 3:21
  • Sure. I am primarily a JavaScript dev that is helping with our Salesforce team. So assume that I'm a newbie with Salesforce. This might even be a silly question, so please tell me if it is. The situation is there is a microsite that is primary there as a form. One of the form questions is to select a session that they want to attend. I need to check if the session is still open. Just a simple boolean that is sitting on the Data extension. They want to do this asynchronously, hince why I'm helping, and I have no idea how to reference a data extension. – s.Lawrenz Feb 27 '17 at 20:00
2

Yes, there is a way to make a javascript asynchronous call to a data extension. You have to include the Ampscipt processing page (code) URL in the AJAX call. Your ajax will interact with the ampscript block of code and fetch data depending on the lookup value.

  • So if I got you correctly, it's a bit of an AMPscript/ Javascript hybird. Let's say I have a ampscript processing page that returns the bit of data I'm looking for. User goes to site, and my call goes to the AMPscript page and I can return that data. Correct? – s.Lawrenz Feb 27 '17 at 19:40
  • yes you are right. @s.Lawrenz – Abhishek Feb 28 '17 at 0:58
  • I'm sorry, this is not working. I have no way of returning data in an AMPscript processing page. Is there some resource you can point me to? Nothing that I google is helpful. – s.Lawrenz Mar 2 '17 at 14:17
  • Can you paste your JavaScript and ampscript code here. I would like to have a look at it. @s.Lawrenz – Abhishek Mar 2 '17 at 14:26
  • I haven't even gotten to coding. There is no documentation for returning variables in AMPscript or SSJS. Everything I search keeps pointing me to Java API calls. – s.Lawrenz Mar 2 '17 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.