Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/bcgov/ECC-OFM-D365
Browse files Browse the repository at this point in the history
  • Loading branch information
Anjana Yadav committed May 7, 2024
2 parents d43c467 + 2514431 commit 2d803f8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public async Task<JsonObject> RunProcessAsync(ID365AppUserService appUserService

var fundingReportData = await InitializeCloneRequest(_processParams.FundingReport.FundingReportId, "ofm_survey_response");
fundingReportData["[email protected]"] = $"/ofm_survey_responses({_processParams.FundingReport.FundingReportId})";
fundingReportData["ofm_unlock"] = false;

//Create a new fundingReport
var sendNewFundingReportResponseRequestResult = await d365WebApiService.SendCreateRequestAsync(_appUserService.AZSystemAppUser, "ofm_survey_responses", fundingReportData.ToString());
Expand Down Expand Up @@ -201,7 +202,7 @@ public async Task<JsonObject> RunProcessAsync(ID365AppUserService appUserService

public async Task<JsonObject> InitializeCloneRequest(string id, string targetEntityName)
{
/* var entityMoniker = "{" + $"'@odata.id':'{targetEntityName}({id})'" + "}";*/
var entityMoniker = "{" + "'@odata.id':'" + targetEntityName + "s" + $"({id})'" + "}";
var fundingReportReponseUri = $"""
InitializeFrom(EntityMoniker=@p1,TargetEntityName=@p2,TargetFieldType=@p3)?@p1={entityMoniker}&@p2='{targetEntityName}'&@p3=Microsoft.Dynamics.CRM.TargetFieldType'ValidForCreate'
Expand Down

0 comments on commit 2d803f8

Please sign in to comment.