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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Business rules are not...
Power Apps
Unanswered

Business rules are not working properly - can save the record with errors

(0) ShareShare
ReportReport
Posted on by 35

Hi everyone, 

I have a business rule with scope on my model-driven form (choosen one). The rule is very simple - when changing decision status to "Cancelled", user must fill the Comments field. Everything is fine - when I change the status of decision,  error show on my screen, Comment field has the asterix and i can not safe the record :

 

mdrapala_0-1665049516580.png

mdrapala_1-1665049543597.png

 

But the strange think happens whe I click on this error - then the notification dissapear and now I can save my record what is not proper because this decision need to has comments (user justification). 

 

I can extend scope to the whole entity and then I have a message :

 

mdrapala_2-1665049840233.png

 

 

But I need to this a little bit earlier - on my form. I am wondering why it doesn't work on my last stage of process, because I have the simillar business rules on previous stages and everything works fine (can not save the record before  comments field is filled). 

 

Did everyone has the same problem and can help me to explain it ? Thanks for all directions and informations.

 

Maciej

 

 

I have the same question (0)
  • Ram Prakash Duraisamy Profile Picture
    5,593 Super User 2025 Season 2 on at

    Hi @mdrapala 

     

    Please make sure usp_comments field is Not Mandatory and you are not using the same in Plugins.

     

    Because as per the Screen Shot BUSINESS PROCESS ERROR will occur from Plugins.

     

    Note:

     

    Click Show Details download the error log file and Check which plugin it is throwing an error.

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Follow me on Twitter : @rampprakashd
    Blog : https://microsoftcrmtechie.blogspot.com

  • Gowri Halan Profile Picture
    262 on at

    @mdrapala Business rule works both side (client and server). when you set to form level it will ask at client side. when you set to entity then it would act at server level.

    In your case looks like you need to handle at client side so set your Business rule to Model driven app form.

    Now make sure to set the required level property of the comment field to optional in the field property.

    make sure to add else condition in your business rule so it should look like below.

    If Account equal Cancelling

      then set comment to business required

    else 

       set it to not business required.

     

    if you want to make it required for more condition then you add more condition in your if condition by grouping it by 'OR'.

  • mdrapala Profile Picture
    35 on at

    The Comments field is optional. I download error log and the business rule is the reason of server side error:

     

    Sync workflow 'If Accounting is To be completed' terminated with error 'Attribute 'usp_comments' cannot be NULL'

    If Accounting is To be completed - it is my business rule.

     

    It is because I swithched scope to Entity. But when my scope is "Form" then i can save my record even when the Comment field is empty, but after I click notification :

    mdrapala_0-1665058195640.png

     

  • mdrapala Profile Picture
    35 on at

    Yes - I have checked my business rule and it looks properly - especielly that I have simillar one that works on earlier stages and decision and works fine. The problem here is that when my business rule has form scope - the error appear on form and system doesn't allow me to save record without Comment, but when i click on the notification:

    mdrapala_1-1665058496737.png

     

    The notification disappear and despite the empty Comment field - I can Save my record without comment. 

    That's why I need to use Entity scope ( but it is not preferable for my case).

  • Gowri Halan Profile Picture
    262 on at

    Hi @mdrapala Not sure how you were able to save without entering comment field though you got the warning notification. Check for other dependent JavaScript on these fields 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard