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

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Make field required on form, if a note has been added

(0) ShareShare
ReportReport
Posted on by 387

Not sure if possible...

I have a form with a notes section on it where people will upload a completed document.

On the form itself I have a field for date completed.

I would like the date completed field to be required, but only after they add a note.

I could do this with power automate pretty easy, but it would take at least 30 second for it to trigger, complete, etc.  then the person would also need to refresh the form int he browser... I would like them to enter a note and then instantly the date field becomes required before they leave the record.

I'm thinking I may be able to use a process to do this?  Or maybe JavaScript?

The problem with process (I think) is that I have note sections on lots of other forms too... so would need a way to know when the note is added from that particular form... javascript maybe, but how would it trigger from the notes pane?

Thoughts?

Thanks,

Terry

I have the same question (0)
  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at
    RE: Make field required on form, if a note has been added

    Hi,

    Create a field IsNotesAdded two optionset on your main entity. Now create real time workflow which will trigger on create of Notes.

    Now check if Is Notes Added if blank or No then update Is Notes added field value to Yes.

    CR54.PNG

    Now create Business Rule and Set Scope as Entity as shown below -

    CR53.PNG

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Mattw112b Profile Picture
    387 on at
    RE: Make field required on form, if a note has been added

    So, followed the instructions.  But process is failing.  It says it is failing because the field (being set in the BR) is required so it cant complete??  Seems like the process flow should complete successfully first, then the business rule would kick off?  But instead it seems that the BR is kicking off before the process completes 100% and wants that field to have a value?  I verified by deactivating the BR and then trying again and it worked as far as setting the IsNoteAdded Field to yes.

    Thoughts?  

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at
    RE: Make field required on form, if a note has been added

    Hi,

    Strange behavior.

    Even if BR kicks off, it would check if 'Is Notes Added' is Yes but in this case the value will be No so it will not set the field required.

    I hope you are making field Business Required and not settings any field value. Please refer my BR screenshot.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Mattw112b Profile Picture
    387 on at
    RE: Make field required on form, if a note has been added

    Yes, created a two option set with default of No.

    Then BR:

    Screenshot-2022_2D00_01_2D00_09-103638.png

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at
    RE: Make field required on form, if a note has been added

    Hi,

    Would you be able to share the screenshot of an error to check this further?

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Mattw112b Profile Picture
    387 on at
    RE: Make field required on form, if a note has been added

    See below...  also the text of the error is attached.

    Like I said though it is clear that it wants the date field to have something in it, which shouldn't be until after the BR runs.

    Screenshot-2022_2D00_01_2D00_10-110902.png


    Plugin Trace:

    [Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.UpdateEntity]
    [UpdateStep3]


    [Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.SyncWorkflowExecutionPlugin]
    [9452e859-ca70-ec11-8943-0022480a90da: ]
    Starting sync workflow 'Set Note Added', Id: 8752e859-ca70-ec11-8943-0022480a90da
    Entering ConditionStep1_step:
    Entering SetFieldRequiredLevelStep1_step:
    Sync workflow 'Set Note Added' terminated with error 'Attribute 'new_reviewdate' cannot be NULL'


    Error Message:

    Exception type: Microsoft.Xrm.Sdk.InvalidPluginExecutionException
    Message: Attribute 'new_reviewdate' cannot be NULL

    -- End stack trace --

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 169

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 77 Super User 2025 Season 2

#3
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 71

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans