Map failing going to Salesforce because of date
Hello,
I have a map I have setup that is coming from a SQL database, going to the salesforce Account entity. I have multiple columns with the my salesforce that are date/time. I also have multiple columns in my database that are date time.
I setup my mapping just fine, map the ‘date1’ column in my sql database to the ‘date1’ column in salesforce. However, my SQL database column record ‘date1’ is NULL. I understand that smartconnect will turn that NULL value into a blank, but the integration still gives me the error ”is not a valid value for the type xsd:datetime.
I know that salesforce can have a blank for that column, because I have manually created entries without a date. My question is, does anyone know how I can force a blank value into the date field in salesforce, or just get smartconnect to completely ignore it (since it is blank, it doesn’t try to integrate it, right)? It doesn’t show my XML output as one of the columns being sent.
I am very confused. Any help would be appreciated.
Thanks,
Brandon
I have a map I have setup that is coming from a SQL database, going to the salesforce Account entity. I have multiple columns with the my salesforce that are date/time. I also have multiple columns in my database that are date time.
I setup my mapping just fine, map the ‘date1’ column in my sql database to the ‘date1’ column in salesforce. However, my SQL database column record ‘date1’ is NULL. I understand that smartconnect will turn that NULL value into a blank, but the integration still gives me the error ”is not a valid value for the type xsd:datetime.
I know that salesforce can have a blank for that column, because I have manually created entries without a date. My question is, does anyone know how I can force a blank value into the date field in salesforce, or just get smartconnect to completely ignore it (since it is blank, it doesn’t try to integrate it, right)? It doesn’t show my XML output as one of the columns being sent.
I am very confused. Any help would be appreciated.
Thanks,
Brandon
Answers
Brandon,
SmartConnect will not automatically convert the null to a blank. You can do this manually using a calculated column.
https://www.eonesolutions.com/Manuals/SmartConnect/SmartConnect%202018/?page=sc_calculated_column
If _DATE1 = “NULL” then
return “”
else
return Convert.ToDateTime(_SOURCEFIELD).ToString(“yyyy-MM-ddThh:mm:ss”)
End IF
SmartConnect will not automatically convert the null to a blank. You can do this manually using a calculated column.
https://www.eonesolutions.com/Manuals/SmartConnect/SmartConnect%202018/?page=sc_calculated_column
If _DATE1 = “NULL” then
return “”
else
return Convert.ToDateTime(_SOURCEFIELD).ToString(“yyyy-MM-ddThh:mm:ss”)
End IF