Workflow Error: Could not load type 'System.Buffers.Text.Utf8Formatter' from assembly

We were using Pre-Image in our workflow and returning an attribute value of this pre-image as an output parameter.

Suddenly we were getting the below error:

An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute): MyProject.Workflow.Value: System.Exception: Could not load type 'System.Buffers.Text.Utf8Formatter' from assembly 'MyProject.Workflow' because the method 'TryFormatDecimalG' has no implementation (no RVA). 

The code was like this:

Entity preImageEntity = crmWorkflowContext.WorkflowExecutionContext.PreEntityImages.Contains("PreBusinessEntity") ? crmWorkflowContext.WorkflowExecutionContext.PreEntityImages["PreBusinessEntity"] : null;

StringAttrValue.Set(context, preImageEntity.Attributes[AttributeName.Get(context)]);

To resolve this issue, We have to implicitly cast attribute name "To String" as shown below

StringAttrValue.Set(context, preImageEntity .Attributes[AttributeName.Get(context)].ToString());


Cheers,

Rocker

Comments

Popular posts from this blog

Power Automate: Create and attach Dataverse note or activity with an entity record through MS flow

How to send Dataverse email through PowerAutomate

How to avoid "for each" in Power Automate when there is only one record in Dataverse List rows