web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Business Rule Sets Fields as 'Business Required' with Differing Results

(0) ShareShare
ReportReport
Posted on by

We have a business rule defined on the Account entity with a scope of 'Entity'. The business rule sets the Name and a custom field to 'Business Required'. If two Account records are imported where one record has a blank name and the other a blank value in the custom field, the record with the blank name is rejected and the record with the blank custom field is not. I would expect both records to be rejected or neither.

Other fields on other entities with similar business rules all behave like the custom field: importing blank values on mandatory fields are allowed.

Does anyone have any ideas why it works differently for the Account Name field?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Adrian Begovich Profile Picture
    1,027 Moderator on at

    Hi Chris13,

    This does not sound like a Business Rule issue, this sounds like a data import issue. How are you importing the data, and what errors are you receiving when importing the records?

  • Community Member Profile Picture
    on at

    Hi Adrian,

    I am exporting the records to Excel, changing them, and then importing the changed workbook.

    The error I receive is "Attribute 'name' cannot be NULL".  Ideally, I would get this error on the custom fields as well. 

    I've read on other posts that the 'business required' attribute on fields does not apply when data is imported nor if data is updated in a workflow. I had hoped to circumvent this problem by creating an entity-level business rule. 

  • Suggested answer
    Adrian Begovich Profile Picture
    1,027 Moderator on at

    Hi Chris13,

    Have you tried populating the name column in your Excel document?

  • Community Member Profile Picture
    on at

    Hi Adrian,

    If I populate the Account Name, then I do not get an error.

    I may not have described my problem very well. I want to prevent users from importing records if required fields are null. This does not happen by simply setting the fields as required during field definition. I was hoping to avoid using workflows to do this validation by using an entity level business rule. To my surprise, the entity level business rule only produces the desired result (error message on null value) on the Account Name and not on any other field that I have tried so far.

  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi9 Chris,

    Is it possible that you have the account name mandatory by default i.e. the actual field is mandatory hence it is is blocked whereas the fields which are marked mandatory from BR are not evaluating during import? Can you mark the custom field mandatory by default (i.e. the field itself) and try the same test again of importing 2 record one with name blank and other with custom field blank.

  • Community Member Profile Picture
    on at

    Hi Ravi, I tried that and it didn't make any difference.

  • Suggested answer
    Adrian Begovich Profile Picture
    1,027 Moderator on at

    Hi Chris13,

    Required fields only apply on the client side (e.g. on the form). As you are creating records via data import the Field Requirement value of fields are not checked. Your requirement cannot be met, as Field Requirement value is not taken into account when users import records into CRM.

  • Community Member Profile Picture
    on at

    Hi Adrian, so why does it work on the Account Name?

  • RaviKashyap Profile Picture
    55,410 Moderator on at

    I guess account name being the primary name field. This is why.

  • Suggested answer
    Adrian Begovich Profile Picture
    1,027 Moderator on at

    Hi Chris13,

    It works on the Account Name as Microsoft designed the Account entity so that the account name field is required when creating an account record. This is the case irrespective of the Field Requirement value or your Business Rule.

    This documentation explains that the name field on the account entity is Application Required.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans