Skip to content

Commit

Permalink
Apply variable name change.,
Browse files Browse the repository at this point in the history
  • Loading branch information
chathurace authored Dec 18, 2023
1 parent 758c637 commit 0d86008
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions servicenow-case-to-salesforce-case/main.bal
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ function fetchCasesFromServiceNow(string fetchFrom, string fetchTill) returns Ca
function addCasesToSalesforce(CaseData[] cases) returns error? {
sf:Client salesforce = check new (salesforceConfig);
foreach CaseData caseData in cases {
stream<Id, error?> customerQuery = check salesforce->query(
stream<Id, error?> customerStream = check salesforce->query(
string `SELECT Id FROM Account WHERE Name = '${caseData.account.name}'`);
record {|Id value;|}? existingCustomer = check customerQuery.next();
check customerQuery.close();
record {|Id value;|}? existingCustomer = check customerStream.next();
check customerStream.close();
if existingCustomer is () {
log:printInfo("Customer not found in Salesforce: " + caseData.account.name);
continue;
Expand Down

0 comments on commit 0d86008

Please sign in to comment.