mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Website: Update CRM helper to handle contacts with no stage. (#24143)
Closes: https://github.com/fleetdm/confidential/issues/8975 Changes: - Updated the update-or-create-contact-and-account helper to only check the current stage value of a contact record if the value is set.
This commit is contained in:
parent
e8021462f5
commit
5f5b7bb273
1 changed files with 3 additions and 2 deletions
|
|
@ -161,8 +161,9 @@ module.exports = {
|
|||
delete valuesToSet.Intent_signals__c;
|
||||
}
|
||||
}
|
||||
// Check the existing contact record's psychologicalStage.
|
||||
if(psychologicalStage) {
|
||||
|
||||
// Check the existing contact record's psychologicalStage (If it is set).
|
||||
if(psychologicalStage && existingContactRecord.Stage__c !== null) {
|
||||
let recordsCurrentPsyStage = existingContactRecord.Stage__c;
|
||||
// Because each psychological stage starts with a number, we'll get the first character in the record's current psychological stage and the new psychological stage to make comparison easier.
|
||||
let psyStageStageNumberToChangeTo = Number(psychologicalStage[0]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue