From 990eb5d926dbcf8133df8536983070b24f4bc27b Mon Sep 17 00:00:00 2001 From: Peter van Gulik Date: Mon, 27 May 2024 18:59:24 +0200 Subject: [PATCH] fix: update isSalesforceId to work for new id-format --- packages/util/src/salesforce.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/util/src/salesforce.ts b/packages/util/src/salesforce.ts index fbbb018f..2fb9bac3 100644 --- a/packages/util/src/salesforce.ts +++ b/packages/util/src/salesforce.ts @@ -80,8 +80,8 @@ export function isSalesforceId(id : string) : boolean { * @param id ID to decode into parts */ export function decodeSalesforceId(id : string) { - const match = /^([a-z0-9]{3})([a-z0-9]{2})([a-z0-9]{2})([a-z0-9]{8})([a-z0-9]{3})?$/i.exec(id); - if (!match || match[3] !== '00') { + const match = /^([a-z0-9]{3})([a-z0-9]{3})0([a-z0-9]{8})([a-z0-9]{3})?$/i.exec(id); + if (!match) { return; } return {