We have created a form in our website to submit info that will create a Lead in Salesforce. Two of the Custom Fields we have are a Departure Date and Return Date. We are submitting the date in the correct ISO 8601 format of yyyy-MM-dd and the API request is correct and the response back is successful. However, the values in the Lead in Salesforce when our team views it is that the date is a day earlier.
Example: 2017-09-15 submitted in the JSON request is showing up in the Salesforce Lead as 9/14/2017.
JSON String:
{
"Agent_IATA__c": "00000000",
"Agency_Name__c": "DEMO AGENCY",
"FirstName": "TEST",
"LastName": "TEST",
"phone": "555-111-3311",
"Email": "test@test.com",
"Best_Time_To_Call__c": "Morning",
"Time_Zone__c": "Pacific Time",
"Lead_Passenger_Name__c": "DEMO TEST",
"Number_Of_Adults__c": "4",
"Number_Of_Children__c": "1",
"Departure_Date__c": "2017-06-24",
"Departure_City__c": "Philadelphia",
"City1__c": "London",
"City2__c": "Dublin",
"City3__c": "",
"City4__c": "",
"City5__c": "",
"Number_Of_Nights1__c": "4",
"Number_Of_Nights2__c": "4",
"Number_Of_Nights3__c": "",
"Number_Of_Nights4__c": "",
"Number_Of_Nights5__c": "",
"Return_Date__c": "2017-07-05",
"Return_From__c": "Dublin",
"Hotel_Star_Rating__c": "4 Star",
"Estimated_Total_Budget__c": "18000",
"Feedback_Comments__c": "TEST",
"Air_Needed__c": "Yes",
"Class_of_Service__c": "Coach",
"Travel_Between_Cities__c": "Car",
"BussinessType__c": "FIT",
"ImmediateBussiness__c": false,
"RecordTypeId": "000000000000",
"Web_Routing_Id__c": "Quote Request",
"RefferingAgent__c": ""
}
We've also tried submitting the JSON request via and external app called POSTMAN and it also has the wrong date in Salesforce.
Does anyone have any idea what could be the problem?
Departure Date
andReturn Date
for sure of the typeDate
? If they wereDatetime
you might get some time zone issues. – Adrian Larson♦ Jan 20 '17 at 18:44