Salesforce Rest Endpoint Post | Community
Skip to main content
ajur
September 7, 2021

Salesforce Rest Endpoint Post

  • September 7, 2021
  • 2 replies
  • 1672 views

Hello,

I'm trying to create an AEM Form which POSTs directly to a Salesforce endpoint (action "Submit to REST endpoint). But I get an exception from guideContainer.af.internalsubmit.jsp which says:

com.adobe.aemds.guide.utils.XMLUtils Invalid Xpath Syntax: 00N0Q000000tYMk
javax.xml.xpath.XPathExpressionException: javax.xml.transform.TransformerException: 00N0Q000000tYMk could not be formatted as a number.

'00N0Q000000tYMk' is the name of the input, which I want to post and which is necessary for salesforce. 

How can I prevent this exception? Any suggestions?

Thanks for your help!

Andrea

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

September 7, 2021

Are you able to submit from the form data model test editor?

ajur
ajurAuthor
September 7, 2021

Sorry, but I don't really know what you mean with "form data model test editor". Can you explain?

 

Additional info:

My AEM version: Adobe Experience Manager 6.5.7.0 with AEM Forms 6.5.7.0 Add-on for OSX

September 7, 2021

The recommended approach is to create DataSource using swagge file. Then use this data source to create form data model

The following video should give you a good understanding. Although the video is created using AEM Forms Cloud Service, the steps are the same for AEM Forms on premise version

https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/forms/integrate-with-salesforce/create-form-data-model.html?lang=en

ajur
ajurAuthor
September 8, 2021

Thanks for you answer. But do I really need such an effort to connect to SF? I only have a tiny form for a newsletter subscription with less inputs. I don't need any authorization at SF. I only have to send the OID as a hidden field to SF. 

If I create a simple HTML file with a form and post it to SF, it works. But if I manually create a form at AEM forms, I get the error from my message above. It seems that AEM Forms has problems with the SF-like input names like 00N0Q000000tYMk. But why?

September 8, 2021

so your SFDC instance does not need any authorization? What objects are you trying to create in SFDC?

what is the submot action of the form that you have created in AEM forms?