2022

Page tree
Skip to end of metadata
Go to start of metadata

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.

{
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); 
  • No labels