0

I'm trying to create batch process from SalesForce Lead table to my sql server database using the flow shown below. For some reason I keep getting the error: That the message payload is of type: HashMap. I tried using Transform Message but I kept getting the same error. How can I take a JSON Object from sales force and convert it into something that the sql server could use?

Which output directive should I use if I use Transform Message to avoid the sql server getting hash map?

Flow:

enter image description here

Error:

enter image description here

codeBarer
  • 2,238
  • 7
  • 44
  • 75
  • Hi @codeBarer, create a sql script with mule expression (MEL). The expression should return the values from the HashMap. Check this as an example: http://stackoverflow.com/questions/24010137/sql-update-statement-with-mel-expression-mule – Ralph Rimorin Mar 08 '16 at 06:44
  • @RalphRimorin I do have MEL for my inserts such as #[payload.FirstName] in my insert sql script. – codeBarer Mar 08 '16 at 18:54
  • If you did the SQL script with MEL correctly. Based from the error message you got a SQL Server Exception. Check that the UID or any ID you declared in you database column correctly matches the length of the IDs from your JSON payload (from Salesforce). Check this link: http://stackoverflow.com/questions/1476861/conversion-failed-when-converting-from-a-character-string-to-uniqueidentifier – Ralph Rimorin Mar 09 '16 at 08:55

0 Answers0