Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested answer

Error when creating a new Record Creation and Update Rule for the Queue

(4) ShareShare
ReportReport
Posted on by 45

I'm getting an error when creating a new Record Creation and Update Rule for the Queue:

ReferenceError: crmCreate is not defined
at Mscrm.setupAdvFind (https://*****.crm.dynamics.com/%7b638009781080000212%7d/webresources/ConvertRuleItem_main_system_library.js:1:2616)
at Mscrm.Form_onload (https://*****.crm.dynamics.com/%7b638009781080000212%7d/webresources/ConvertRuleItem_main_system_library.js:1:68)
at y._executeFunctionInternal (https://*****.crm.dynamics.com/uclient/scripts/app.js?v=1.4.4796-2209.1:2053:5286)
at y.execute (https://*****.crm.dynamics.com/uclient/scripts/app.js?v=1.4.4796-2209.1:2053:3782)
at https://*****.crm.dynamics.com/uclient/scripts/app.js?v=1.4.4796-2209.1:164:26973
at i (https://*****.crm.dynamics.com/uclient/scripts/app.js?v=1.4.4796-2209.1:340:88)
at ee._executeIndividualEvent (https://*****.crm.dynamics.com/uclient/scripts/app.js?v=1.4.4796-2209.1:164:26947)
at ee._executeEventHandler (https://*****.crm.dynamics.com/uclient/scripts/app.js?v=1.4.4796-2209.1:164:23952)
at Object.execute (https://*****.crm.dynamics.com/uclient/scripts/app.js?v=1.4.4796-2209.1:164:21169)
at N._executeSyncAction (https://*****.crm.dynamics.com/uclient/scripts/app.js?v=1.4.4796-2209.1:954:692)

Error Details:
Event Name: onload
Function Name: Mscrm.Form_onload
Web Resource Name: ConvertRuleItem_main_system_library.js
Solution Name: System
Publisher Name: MicrosoftCorporation

If I click ok and still create the rule I'm getting another error

Exception Message: Error identified in Payload provided by the user for Entity :'convertrules', For more information on this error please follow this help link go.microsoft.com/.../ ----> InnerException : Microsoft.OData.ODataException: Cannot convert the literal '4202' to the expected type 'Edm.String'. ---> Microsoft.OData.ODataException: Cannot convert a value of type 'Edm.Int32' to the expected target type 'Edm.String'.
at Microsoft.OData.ODataPayloadValueConverter.ConvertInt32Value(Int32 intValue, Type targetType, IEdmPrimitiveTypeReference primitiveTypeReference)
at Microsoft.OData.ODataPayloadValueConverter.ConvertFromPayloadValue(Object value, IEdmTypeReference edmTypeReference)
--- End of inner exception stack trace ---
at Microsoft.OData.ODataPayloadValueConverter.ConvertFromPayloadValue(Object value, IEdmTypeReference edmTypeReference)
at Microsoft.Crm.Extensibility.ODataV4.CrmPrimitivePayloadValueConverter.ConvertFromPayloadValue(Object value, IEdmTypeReference edmTypeReference)
at Microsoft.OData.JsonLight.ODataJsonLightReaderUtils.ConvertValue(Object value, IEdmPrimitiveTypeReference primitiveTypeReference, ODataMessageReaderSettings messageReaderSettings, Boolean validateNullValue, String propertyName, ODataPayloadValueConverter converter)
at Microsoft.OData.JsonLight.ODataJsonLightPropertyAndValueDeserializer.ReadPrimitiveValue(Boolean insideJsonObjectValue, IEdmPrimitiveTypeReference expectedValueTypeReference, Boolean validateNullValue, String propertyName)
at Microsoft.OData.JsonLight.ODataJsonLightPropertyAndValueDeserializer.ReadNonEntityValueImplementation(String payloadTypeName, IEdmTypeReference expectedTypeReference, PropertyAndAnnotationCollector propertyAndAnnotationCollector, CollectionWithoutExpectedTypeValidator collectionValidator, Boolean validateNullValue, Boolean isTopLevelPropertyValue, Boolean insideResourceValue, String propertyName, Nullable`1 isDynamicProperty)
at Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.ReadEntryDataProperty(IODataJsonLightReaderResourceState resourceState, IEdmProperty edmProperty, String propertyTypeName)
at Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.ReadPropertyWithValue(IODataJsonLightReaderResourceState resourceState, String propertyName, Boolean isDeltaResourceSet)
at Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.<>c__DisplayClass9_0.<ReadResourceContent>b__0(PropertyParsingResult propertyParsingResult, String propertyName)
at Microsoft.OData.JsonLight.ODataJsonLightDeserializer.ProcessProperty(PropertyAndAnnotationCollector propertyAndAnnotationCollector, Func`2 readPropertyAnnotationValue, Action`2 handleProperty)
at Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.ReadResourceContent(IODataJsonLightReaderResourceState resourceState)
at Microsoft.OData.JsonLight.ODataJsonLightReader.StartReadingResource()
at Microsoft.OData.JsonLight.ODataJsonLightReader.ReadResourceSetItemStart(PropertyAndAnnotationCollector propertyAndAnnotationCollector, SelectedPropertiesNode selectedProperties)
at Microsoft.OData.JsonLight.ODataJsonLightReader.ReadAtStartImplementationSynchronously(PropertyAndAnnotationCollector propertyAndAnnotationCollector)
at Microsoft.OData.ODataReaderCore.ReadImplementation()
at Microsoft.OData.ODataReaderCore.InterceptException[T](Func`1 action)
at System.Web.OData.Formatter.Deserialization.ODataReaderExtensions.ReadResourceOrResourceSet(ODataReader reader)
at System.Web.OData.Formatter.Deserialization.ODataResourceDeserializer.Read(ODataMessageReader messageReader, Type type, ODataDeserializerContext readContext)
at System.Web.OData.Formatter.ODataMediaTypeFormatter.ReadFromStream(Type type, Stream readStream, HttpContent content, IFormatterLogger formatterLogger).

ErrorCode: -2147015424
HexErrorCode: 0x80072500

Activity Id: a991290d-3390-4e0a-8ba8-9082be806253

0x80072500
-2147015424
Name: InvalidOneToManyRelationship
Message: OneToMany Entity Relationship with EntityRelationshipId '{0}' has null ReferencingEntityRole

However, I did not create any customizations for Queues or Record Creation and Update Rules. I also did not make any changes to the Power Automate Flow.

Can someone explain what's causing this error and how to fix it?

  • DomeScribblez87 Profile Picture
    12 on at
    Error when creating a new Record Creation and Update Rule for the Queue
    Hi All,  has anyone gotten this error resolved because i am facing the same issue. I upgraded from 9.0 to 9.1 using the latest update of 9.1 the Microsoft Dynamics 365 (on premises) Update 1.35 and still sit with the same issue. 
  • Suggested answer
    Daivat Vartak (v-9davar) Profile Picture
    7,805 Super User 2025 Season 1 on at
    Error when creating a new Record Creation and Update Rule for the Queue
    Hello OlehBohoslavets,
     

    You're encountering a complex issue with Record Creation and Update Rules and Queues in Dynamics 365, indicated by two distinct errors: a JavaScript error (ReferenceError: crmCreate is not defined) and an OData exception during rule creation. Let's break down each error and how to resolve them.

    Error 1: ReferenceError: crmCreate is not defined

    • Explanation:

      • This JavaScript error occurs during the onload event of the ConvertRuleItem_main_system_library.js web resource.
      • The crmCreate function, which is part of the legacy Xrm.Page model, is not defined or accessible in the context of this script.
      • This suggests a potential incompatibility or issue with the form's JavaScript execution environment.
      • This problem usually occurs when a update to the dynamics 365 environment has occured, and the javascript that is used is outdated. 

    • Troubleshooting and Solutions:

      • Clear Browser Cache:

        • Start by clearing your browser's cache and cookies. Sometimes, outdated cached scripts can cause conflicts.
        • Try accessing Dynamics 365 in a different browser or in an incognito/private window. 

      • Check Web Resource Version:

        • The error points to ConvertRuleItem_main_system_library.js. This is a system web resource.
        • It is highly unlikely that this file was modified. But it is possible that an update to Dynamics 365, has created a conflict.
        • If possible, try to create the convert rule in a different dynamics 365 environment, to see if the problem is environment specific. 

      • System Solution Issue:

        • Since this is a system web resource, the problem could be related to the system solution.
        • Contact Microsoft Support. This type of error is deep within the system, and will require Microsoft to investigate. 
          

    •  

    Error 2: OData Exception During Rule Creation

    • Explanation:

      • This error occurs during the creation of the Record Creation and Update Rule (convertrules entity).
      • It indicates a data type mismatch between the value provided in the payload and the expected data type in the database.
      • Specifically, it's trying to convert an integer (Edm.Int32) to a string (Edm.String) when it's not expecting to.
      • The error message "InvalidOneToManyRelationship" also points to a problem with a relationship, and that the referencing entity role is null. 

    • Troubleshooting and Solutions:

      • Data Validation:

        • Carefully review the data you're entering when creating the rule, especially any lookup or option set fields.
        • Ensure that the values you're providing are of the correct data type. 

      • Relationship Issues:

        • This portion of the error is the most concerning.
        • "InvalidOneToManyRelationship" indicates that a One-to-Many relationship is broken.
        • Because you stated that you have made no customizations, this indicates a problem with the system relationships.
        • Contact Microsoft Support. This type of error is deep within the system, and will require Microsoft to investigate. 

      • Power Automate Flow:

        • Even though you haven't made direct changes, review the Power Automate flow associated with the rule.
        • Ensure that the flow is passing the correct data types. 

      • System Solution Issue:

        • As with the javascript error, this error indicates a problem with the system solution.
        • Contact Microsoft Support. This type of error is deep within the system, and will require Microsoft to investigate.

        •  

    •  

    Key Recommendations:

    • Microsoft Support:

      • Given that both errors point to potential system-level issues, contacting Microsoft Support is crucial. They have access to internal logs and diagnostic tools that can help identify the root cause. 

    • Isolate the Issue:

      • Try creating a very simple Record Creation and Update Rule with minimal configuration to see if the error persists.
      • Test in a different Dynamics 365 environment if possible. 

    • Document Everything:

      • Document all the steps you've taken and the error messages you're receiving. This will help Microsoft Support troubleshoot the issue more efficiently. 

      •  

    •  

    In summary, the combination of a JavaScript error and an OData exception suggests a complex problem that likely requires Microsoft's intervention. Prioritize contacting support and providing them with detailed information about your environment and the steps you've taken.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak
  • Suggested answer
    Tom_Gioielli Profile Picture
    1,834 on at
    Error when creating a new Record Creation and Update Rule for the Queue
    Looks like an error with a Microsoft JavaScript library/function on the form. Since multiple users have reported it here, I'm guessing it was a problem with their release. I would recommend submitting a support ticket to Microsoft from your tenant with these details (MS support does not frequent these forums).
     
    In the meantime, I would recommend checking for app updates regularly to see if they have a fix pushed out soon. If anyone hears back from MS, you should post it here for other folks. Not too much that can be done otherwise, as this is a MS script and process.
  • FM-27032007-0 Profile Picture
    2 on at
    Error when creating a new Record Creation and Update Rule for the Queue
    Hi,
     
    I'm receiving same error. Were you able to solve it?
    If yes, can you please share the steps to solve this issue?
     
     
    Thanks
     
  • Oleg Kos Profile Picture
    9 on at
    Error when creating a new Record Creation and Update Rule for the Queue
    The same thing..

    When attempting to create a business rule for processing incoming emails using Automatic Record Creation and Update Rules in CRM, the following issue occurs:

    1. Step 1 – I create the rule and save it successfully.
    2. Step 2 – When trying to add a condition, an error appears immediately upon opening the form.
  • KS-18120957-0 Profile Picture
    4 on at
    Error when creating a new Record Creation and Update Rule for the Queue
    Did you get a resolution for this issue? I am now seeing the same issue when attempting to create a new records creation and update rule however I was not getting the error around 4 -6 weeks ago.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 51 Most Valuable Professional

#2
Ramesh Kumar Profile Picture

Ramesh Kumar 42

#3
David Shaw_UK Profile Picture

David Shaw_UK 27

Featured topics

Product updates

Dynamics 365 release plans