Problem getting correct date format
Thursday, May 2, 2019 at 04:39amHi,
This issue popped up in the last couple of weeks in our testing Sandbox environment. We've been using Text Anchors to configure all our signatures, so we have a FULLNAME block, and a corresponding Date signed that gets auto-populated on signature. In the past, the date format was always the GMT datetime format and that worked fine. Lately, it seems our date format is being forced to MMMM dd, yyyy .
I tried overwriting the format, but nothing seems to work. Looking at the 11.25 release notes, I found this, but the opposite seems to be happening:
PB-21327: Fixed an issue that prevented a document's Accepted and Confirmed dates from displaying a timestamp.
Here's the code I use to set the field:
public override ESignLiveAPIObjects.Field prepareEsignField(eSignLive_Conventions__c convention) { ESignLiveAPIObjects.Field field = new ESignLiveAPIObjects.Field(); field.subtype = convention.Signature_Sub_Type__c; field.type = convention.Signature_Type__c; field.extract = false; if(!String.isBlank(convention.Text_Binding__c)){ field.binding = convention.Text_Binding__c; field.value = 'yyyy-MM-dd'; } field.extractAnchor = new ESignLiveAPIObjects.ExtractAnchor(); field.extractAnchor.index = 0; field.extractAnchor.text = pdf.language == 'FR' ? convention.Text_FR__c : convention.Anchor_Text__c; field.extractAnchor.characterIndex = 0; field.extractAnchor.leftOffset = convention.Left__c.intValue(); field.extractAnchor.topOffset = convention.Top__c.intValue(); field.extractAnchor.width = convention.Anchor_Width__c.intValue();//Default 175; field.extractAnchor.height = convention.Anchor_Height__c.intValue();//Default 40; field.extractAnchor.anchorPoint = ESignLiveAPIObjects.AnchorPoint.TOPLEFT; return field; }Here is the resulting JSON for the package after creation:
"fields": [ { "binding": "{approval.signed}", "validation": null, "id": "", "page": 9, "data": null, "top": 491, "subtype": "LABEL", "extractAnchor": null, "formattedValue": "May 02, 2019", "left": 566, "width": 125, "height": 35, "extract": false, "type": "INPUT", "value": "MMMM dd, yyyy", "name": "" }, { "binding": null, "validation": null, "id": "", "page": 9, "data": null, "top": 485, "subtype": "FULLNAME", "extractAnchor": null, "formattedValue": "", "left": 206, "width": 176, "height": 40, "extract": false, "type": "SIGNATURE", "value": "", "name": "" } ]
Reply to: Problem getting correct date format
Thursday, May 2, 2019 at 05:47amReply to: Problem getting correct date format
Friday, May 3, 2019 at 02:50amReply to: Problem getting correct date format
Friday, May 3, 2019 at 04:34am