Salesforce CRM Multiple org integration with SAM

arundpm
Tera Contributor

Hi Team,

 

I have integrated with salesforce CRM org A and its working. When I try to integrate with org B, Iam not able to publish the integration profile with an error .

 

"Alert level: critical.Error: java.lang.RuntimeException: Unparseable date: "2023-08-03 00:00:00".

 

I have followed the steps available in the document and trying to create a child connection from direct integration profile. Can anyone please shed some light on this and help.

 

Regards,

Arun

2 REPLIES 2

Casper6060
Mega Sage

I had this exact issue today with a customer and could not understand why. (Note this was for implementing with 1 salesforce system, not multiple)

 

So i did a deep dive into the setup and found the error was happening inside the script include "CustomIntegrationProfileUtilsAJAX". There was a function called formatDateTime where it pulls the currently logged in users DateTime format from the current session and uses that (i think for the publish date).

 

So i looked at my profile and found that it was set to be the system format of dd.MM.yyyy so i changed that to just dd-MM-yyyy and also update my timezone from Europe/Zurich to just Europe/Copenhagen.

I saved the change and logged out of the system, then when i logged back in and tried again it failed (i blame caching).

 

Then i opened scripts background to check what the code returned 

gs.getSession().getUser().getDateTimeFormat(); is the exact code the script include uses. And after it showed the correct format, i went back and tried again and then it worked correctly.

I had the same issue and Casper's workaround fixed it for me.  Thanks for the suggestion!