Hi,
Am trying to clone business rules from quote entity to custom entity using C# SDK.
I have successfully clone the business rules but I couldn't able to activate the business rule using C#.
Its getting update same definition row itself. its not creating sperate row for activate business rule so that business rule is not visible in powerapps.
I have attached the code snippet below:
But its working fine for workflow(process).
private void ActivateWorkflow(IOrganizationService organizationService, Guid _workflowId)
{
var activateRequest = new SetStateRequest
{
EntityMoniker = new EntityReference
(Workflow.EntityLogicalName, _workflowId),
State = new OptionSetValue((int)WorkflowState.Activated),
Status = new OptionSetValue((int)workflow_statuscode.Activated)
};
organizationService.Execute(activateRequest);
}