Skip to content

Commit

Permalink
change TemplateNumber as parameter from cloud flow (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardInCGI authored Jul 17, 2024
1 parent 14c448d commit 782d2dd
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ public async Task<ProcessData> GetDataFromCRMAsync(string requestUri)
// get all supplementaries records for all reminders
var localDateSupplementaries = await GetDataFromCRMAsync(SupplementariesUri);
// get emailtemplate
var localDateEmailTemplate = await _emailRepository.GetTemplateDataAsync(_notificationSettings.EmailTemplates.First(t => t.TemplateNumber == 220).TemplateNumber);
//var localDateEmailTemplate = await _emailRepository.GetTemplateDataAsync(_notificationSettings.EmailTemplates.First(t => t.TemplateNumber == 220).TemplateNumber);
var localDateEmailTemplate = await _emailRepository.GetTemplateDataAsync(Int32.Parse(_processParams.Notification.TemplateNumber));
JsonArray emailTemplate = (JsonArray)localDateEmailTemplate.Data;
JsonNode templateobj = emailTemplate.FirstOrDefault();
var updateRemindersRequests = new List<HttpRequestMessage>() { };
Expand Down Expand Up @@ -295,7 +296,7 @@ public async Task<ProcessData> GetDataFromCRMAsync(string requestUri)
foreach (var getContact in getContacts)
{
string tempEmaildescription = emaildescription;
tempEmaildescription = tempEmaildescription?.Replace("#ContactName#", getContact["contact.ofm_last_name"].ToString() + " " + getContact["contact.ofm_first_name"].ToString());
tempEmaildescription = tempEmaildescription?.Replace("#ContactName#", getContact["contact.ofm_last_name"]?.ToString() + " " + getContact["contact.ofm_first_name"]?.ToString());
var requestBody = new JsonObject(){
{"subject",subject },
{"description",tempEmaildescription},
Expand Down

0 comments on commit 782d2dd

Please sign in to comment.