From d648abc6fdd6a0ef79889fbe6e774adf96857899 Mon Sep 17 00:00:00 2001 From: "Denise D." Date: Mon, 27 Jul 2026 16:31:07 +0200 Subject: [PATCH] other small changes --- file.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/file.js b/file.js index bfe4606..9a89ed9 100644 --- a/file.js +++ b/file.js @@ -45,6 +45,9 @@ async function initializeSalesforceConnection() { console.log('Salesforce connection is ready.'); } +// the pdf files contain the identifying ids of the users such as 'Codice Fiscale' (CF) and we use them to attach +// the page/pages to the specific account that has that id. If CFs are not available we search based on the +// name an lastname of the user async function attachPdfToAccount(sfdc) { let parser; try { @@ -64,7 +67,7 @@ async function attachPdfToAccount(sfdc) { conditions.push(`CF__c='${ codiceFiscale }'`); } - // since the name and lastname of the user are reversed, I need to put it in order + // since the name and lastname of the user are reversed in some files, we need to put it in order // to match the name from the database const nameMatch = result.text.match(/Il\s+Sig\.\/La\s+Sig\.ra[ \t]+([A-Za-zÀ-ÿ']+(?:[ \t]+[A-Za-zÀ-ÿ']+)+)/i);