cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
peteaxtell
Helper I
Helper I

Flow trigger suddenly stopped working

I have a flow that is designed to trigger when a phone call is closed which has a custom field (winton_sendnotesonclosure) equal to true. This was working and has now stopped, without anything being changed. I have tried deleting the trigger and recreating, same issue. I have tried changing the filter criteria, error persists. I can only get it to work if there is no filter at all. Why would it just stop working?!

 

 

 

{
  "error": {
    "code": "0x80040203",
    "message": "Exception parsing statecode eq 1 and winton_sendnotesonclosure eq true submitted for attribute filterexpression of callback registration. Target entity: phonecall. Exception: System.InvalidOperationException: AttributeTypeCode not valid:Virtual\r\n   at Microsoft.Crm.ObjectModel.CallbackRegistrationTypeMapFactory.Get(AttributeMetadata attributeMetadata, EntityMetadata entityMetadata)\r\n   at Microsoft.Xrm.Sdk.Data.CodeGen.ClassTypeFactory.BuildType(String logicalName, IDictionary`2 entityMetadata, IDictionary`2 types)\r\n   at Microsoft.Xrm.Sdk.Data.CodeGen.ClassTypeFactory.Create(IEnumerable`1 entityMetadata)\r\n   at Microsoft.Crm.ObjectModel.EdmModelBuilder.BuildClrType()\r\n   at Microsoft.Crm.ObjectModel.EdmModelBuilder..ctor(EntityMetadata xrmMetadata, IOrganizationContext context, ILogger logger)\r\n   at Microsoft.Crm.ObjectModel.CallbackRegistrationEdmModelCacheItem.GetOrBuildEdmModel(EntityMetadata xrmMetadata, IOrganizationContext context, ILogger logger)\r\n   at Microsoft.Crm.ObjectModel.EdmModelEvaluator..ctor(IOrganizationContext context, EntityMetadata xrmMetadata, Entity entityData)\r\n   at Microsoft.Crm.ObjectModel.CallbackRegistrationService.<>c__DisplayClass28_1.<ValidateInputEntity>b__0()\r\n   at System.Lazy`1.CreateValue()\r\n   at System.Lazy`1.LazyInitValue()\r\n   at Microsoft.Crm.ObjectModel.CallbackRegistrationService.ValidateInputEntity(IBusinessEntity entity, ExecutionContext context, IFeatureDetailContainer featureDetailContainer)",
    "innererror": {
      "message": "Exception parsing statecode eq 1 and winton_sendnotesonclosure eq true submitted for attribute filterexpression of callback registration. Target entity: phonecall. Exception: System.InvalidOperationException: AttributeTypeCode not valid:Virtual\r\n   at Microsoft.Crm.ObjectModel.CallbackRegistrationTypeMapFactory.Get(AttributeMetadata attributeMetadata, EntityMetadata entityMetadata)\r\n   at Microsoft.Xrm.Sdk.Data.CodeGen.ClassTypeFactory.BuildType(String logicalName, IDictionary`2 entityMetadata, IDictionary`2 types)\r\n   at Microsoft.Xrm.Sdk.Data.CodeGen.ClassTypeFactory.Create(IEnumerable`1 entityMetadata)\r\n   at Microsoft.Crm.ObjectModel.EdmModelBuilder.BuildClrType()\r\n   at Microsoft.Crm.ObjectModel.EdmModelBuilder..ctor(EntityMetadata xrmMetadata, IOrganizationContext context, ILogger logger)\r\n   at Microsoft.Crm.ObjectModel.CallbackRegistrationEdmModelCacheItem.GetOrBuildEdmModel(EntityMetadata xrmMetadata, IOrganizationContext context, ILogger logger)\r\n   at Microsoft.Crm.ObjectModel.EdmModelEvaluator..ctor(IOrganizationContext context, EntityMetadata xrmMetadata, Entity entityData)\r\n   at Microsoft.Crm.ObjectModel.CallbackRegistrationService.<>c__DisplayClass28_1.<ValidateInputEntity>b__0()\r\n   at System.Lazy`1.CreateValue()\r\n   at System.Lazy`1.LazyInitValue()\r\n   at Microsoft.Crm.ObjectModel.CallbackRegistrationService.ValidateInputEntity(IBusinessEntity entity, ExecutionContext context, IFeatureDetailContainer featureDetailContainer)",
      "type": "System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]",
      "stacktrace": "   at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.CreateInternal(Entity entity, InvocationContext invocationContext, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, Dictionary`2 optionalParameters)\r\n   at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.CreateOrganizationResponse(Entity entity)\r\n   at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.CreateEdmEntity(CrmODataExecutionContext context, String edmEntityName, EdmEntityObject entityObject, Boolean isUpsert)\r\n   at Microsoft.Crm.Extensibility.OData.EntityController.PostEntitySetImplementation(String& entitySetName, EdmEntityObject entityObject)\r\n   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)\r\n   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
    }
  }
}

 

 

snip.PNG

8 REPLIES 8
rimatos
Microsoft
Microsoft

Hi @peteaxtell,

 

Based on the error message you presented we have the following Exception:

 

Exception parsing statecode eq 1 and winton_sendnotesonclosure eq true submitted for attribute filterexpression of callback registration. Target entity: phonecall. Exception: System.InvalidOperationException: AttributeTypeCode not valid

 
The "AttributeTypeCode not valid" tells us that the values that you are passing into the filter do not correspond to the actual value type of the fields you are trying to filter (statecode and winton_sendnotesonclosure).

As such my suggestion would be to first collect the data only filtering one of the fields at the type, in order to understand which of them is the faulty one.

Additionally to assist this you could use the Compose action to store the statecode and winton_sendnotesonclosure values from your phone calls entity and run the Flow to understand what exactly is in these values.

you have an example bellow:

image.pngimage.png

 

 

Hope this helps!

 

Regards,

Ricardo

Thanks, that would work as a workaround but doesn't explain why the flow has stopped working when neither the flow nor CRM have changed.

Hi @peteaxtell,

No problem glad to help! In order to understand that a more in depth Troubleshooting would need to be made.

 

My suggestion here would be to try the workaround provided in order to understand what are the values of the types, and double check if no one your organization made any changes to the Flow or on the CRM entity, at the field type level.

If this is not the case it could be that the connector itself suffered some changes that you might not be aware of. What is the default name of trigger and its respective connector that you are currently using for this?

 

Regards,

Ricardo

augustandre23
New Member

Hi @peteaxtell ,

 

I have the same problem when I'm using the CDS (current environment). In my opinion (without having proves), the condition on that context is not working for a field type 2 options or an option set. I think it is a recent bug because it worked well for me before as well.

 

@rimatos, maybe you can validate on your side, it will be wonderful.

 

Thank you,

A

 

Anybody who has received an update on this issue?

 

I have the exact same issue with the filter expression using the CDS (current environment) connector. This is regardless of, whether we are talking about evaluating a string, boolean, or an option set. Examples:

 

currentsituation eq 'test'

on_hold eq true

 

I would see the following under in the run-history: "There's a problem with the flow's trigger."

 

I am wondering, if the proper syntax is simply different for filter expression, than it is for filter query. Has anybody experienced a statement like the above working?

 

Thanks.

Sebe1
Frequent Visitor

Hi all,

 

the issue still exists. I'm having the exact same problem.

I've one Flow that works with "statuscode eq 100000008" and the next one doesn't. Looking on the same field but with "statuscode eq 100000011".

 

I'm also using the CDS (current environment) Trigger.

 

Best,

Sebe

nathangg_93
Regular Visitor

Hi, you can get this to work if you use this: 

 

@equals(triggerOutputs()?['body/jt_feedback'], true)
 
in the trigger conditions settings of the trigger. Not the most elegant solution, but it works for me.
 

Thanks! 🙂

That was very helpful.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (91,875)