public bool UpdateSpecificRiskAssessmentIncludeMLROStage(EntityReference specificRiskAssessment, string messageName, int mLROStageInclusion, int riskRating)
{
tracingService.Trace("Calling UpdateSpecificRiskAssessmentIncludeMLROStage");
bool newIncludeMLROStage;
if (messageName == "Create")
{
newIncludeMLROStage = (mLROStageInclusion == 206340001 );
}
else if (messageName == "Update")
{
newIncludeMLROStage = (mLROStageInclusion == 206340000 && riskRating == 206340001 ) || (mLROStageInclusion == 206340001 );
Entity updateEntity = new Entity("tt_kyccheck", specificRiskAssessment.Id)
{
["tt_kycincludemlrostage"] = newIncludeMLROStage
};
crmService.Update(updateEntity);
}
else
{
throw new Exception("Unhandled message type.");
}
tracingService.Trace("Completed UpdateSpecificRiskAssessmentIncludeMLROStage");
return newIncludeMLROStage;
}