• Randall Magliozzi
  • NEWBIE
  • 5 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi all, 

I am currently working on a project that involves a Form Handler that uses Ajax to perform a calculation. In the past month the form itself has had 189 succesful submissions. However the number of unsuccessful submissions is much higher. While the Ajax is handling the calculation and serving the results to the client, Pardot receives the post so infrequently that it is becoming difficult to attribute a cause. 

The developer I am working with came across this today. 


"Pardot doesn't support submitting data to form handlers via Ajax requests. When attempting to submit data to a form handler using Ajax, you will likely see errors like:

XMLHttpRequest cannot load {www.site.com/FormHandlerURL}. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '{page from which form handler should be getting submitted on client's website}' is therefore not allowed access.

This is what's known as CORS (Cross-Origin Resource Sharing). Pardot doesn't currently support CORS or JSONP for form handlers. It is possible to simulate a JSONP response by setting the Success and Error URLs for the form handler to be JavaScript URLs that execute Success and Error callbacks, respectively."

Can anyone point me in the direction of documentation that can support this claim or attest to it being valid? I believe that we have a solution however I am trying to understand the reasoning why they would not support this. 

Thank You in Advance
Hi All - I'm hoping someone can help.  I've deployed the class at the following link:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_interface_TerritoryMgmt_OpportunityTerritory2AssignmentFilter.htm

I'm using this to assign opportunities.  All of our accounts have exactly one opportunity.  When I run the opportunity filter, it is assigning 165 out of 629 opportunities.  If I run it again, it assigns 464 opportunities and leaves 165 unassigned.  Has anyone experienced this?  Salesforce support told me my only option is to look for help here as we are not a premier customer.  

Thanks for any help you can provide.