Skip to content

Commit

Permalink
Workaround CRM plugin issue with explicit null TRN (#1701)
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad authored Nov 22, 2024
1 parent 2e78108 commit 8893ef8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ internal async Task<CreatePersonResult> ExecuteAsync(TestData testData)
dfeta_StatedMiddleName = statedMiddleName,
dfeta_StatedLastName = lastName,
BirthDate = dateOfBirth.ToDateTime(new TimeOnly()),
dfeta_TRN = trn,
GenderCode = gender,
dfeta_qtlsdate = _qtlsDate.ToDateTimeWithDqtBstFix(isLocalTime: false),
dfeta_TrnRequestID = _trnRequest is { } trnRequest ? TrnRequestHelper.GetCrmTrnRequestId(trnRequest.ApplicationUserId, trnRequest.RequestId) : null,
Expand All @@ -331,6 +330,12 @@ internal async Task<CreatePersonResult> ExecuteAsync(TestData testData)
dfeta_loginfailedcounter = _loginFailedCounter
};

// The conditional is to work around issue in CRM where an explicit `null` TRN breaks a plugin
if (trn is not null)
{
contact.dfeta_TRN = trn;
}

if (_email is not null)
{
contact.EMailAddress1 = _email;
Expand Down

0 comments on commit 8893ef8

Please sign in to comment.