2022

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Issue:

(Payments To Receivable From QuickBooks desktop to SalesForce)

For example: If the time zone needs to be Hawaii then needs to do the following update on mappings.

Payment Date should be on Hawaii Time Zone by default it will be in GMT.

Solution:

Go to receivable mappings, then on Payment Date (Payment_Date__c) which is a custom Field on Salesforce we have to update the below code.

Code Block
{
java.text.SimpleDateFormat sdfIn = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("YYYY-MM-dd"); 
java.time.LocalDateTime datetime = java.time.LocalDateTime.now(java.time.ZoneId.of("GMT-10"));
datetime=datetime.minusHours(10);
java.util.Date date = null;
try 
{
date = sdfIn.parse(datetime.toString());
} 
catch (Exception e) 
{
e.printStackTrace();
}
return LOG(formatter.format(date));
}


Note: java.time.LocalDateTime.now(java.time.ZoneId.of("GMT-10")which is the hawaii time zone);