Maiing dates from GP to CRM
I am trying to update a Contract Line in CRM Start Date with a Billing Start Date from GP. Since CRM is a DateTime column I tried to set it to a calculation column with the following code:
But this is giving me the invalid date error. Any idea why this is? Looking at the date formats in those two fields in GP and CRM they are identical but I am still receiving this invalid date error. Any help is much appreciated!
I think you have to post the CRM date time as a UTC date-time.
Here is a link that shows how to pull the UTC time and convert it, so you should be able to reverse the process to convert it back to UTC time.
if you receive something like the following it means that the Start Date of the Contract Line is not within the range of the header Start and End Date:
"The start date is invalid. For entity 'contractdetail' where 'productserialnumber = 7,' in organization 'DevelopOrganization1' "
SmartConnect already converts a normal DateTime to a CRM DateTime.
I would suggest running the map to file and checking the output of the StartDate in the XML file. If the date is not correct you can use the Date Column in additional columns to convert the date to the desired format before sending it to CRM.
Thank you both!
Ruaan it does look like only some of the StartDates are not correct and that is why I was getting the error. Some look to be in the right format but for some reason just keep throwing the error. Not sure why yet.
Can't seem to figure this one out. I've written to file and my dates looks like this '6/29/2014 12:00:00 AM' is this not a valid format? I tried truncating them to be just 6/29/2014 and still no luck. And its the exact same error Ruaan mentions:
"The start date is invalid. For entity 'contractdetail' where 'customerid = guid,' in organization 'ORG' "
To add a bit more info to the above…If I write to file the date I am getting is 6/29/2014 12:00:00 AM and I am only getting the invalid date message for the end date not the start date! Even though the start date is the exact same format as the end date.
It also looks like only the contract lines which have a NULL end date are actually being created in CRM, not the ones with actual data…why would the ones with data say Invalid and the ones which are NULL work fine?
If you would like to submit an answer or comment, please sign in to the eOne portal.