Changelog 3B CLM v5.10

From 3B Knowledge
Jump to navigation Jump to search

Fixes

- Value formatters weren't correctly evaluated

Changes

  • Now, 3B Sign function expressions will inherit two new parameters - "field" and "submitterRecords". The field is the contextual function expression field, whereas the submitterRecords is an array of all the submitters added to the document. You can use these two parameters in order to fix re-generation where the value could be blank.

So, for example, you can implement a function expression like so to ensure that a corre

(args) => {
  console.log('CURRENT DATE FUNCTION', args)

  if(!args.value){
    //If the value is missing, it is likely because the document was submitted before version 5.9
    //In that case, use the Signed Timestamp
    if(!!args.submitterRecords && args.submitterRecords.length > 0){
      //Get the contextual submitter for the field
      const contextualSubmitter = args.submitterRecords.find(s => args.field.submitter?.order === s.b3d__Order__c);
      //Get the signed timestamp
      if(!!firstSubmitter.b3d__Signed_Timestamp__c){
          return new Date(firstSubmitter.b3d__Signed_Timestamp__c).toDateString()
      }
    }
  }
  return new Date().toDateString()
}

Link

https://login.salesforce.com/packaging/installPackage.apexp?p0=04tJ7000000LSb0