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)

How to trigger business rule (workflow) on Service Activity that is missing Note(s) in CRM 2016

(0) ShareShare
ReportReport
Posted on by

We have service staff who close out Service Activities with no Notes or documentation of what they did.  This creates a huge burden for their manager, who has to have them re-open their SAs, then properly document their work in the Notes, which is where the work gets documented.

I was going to create a Business Rule to stop this until I realized that Business Rules are not available for Service Activities.

Since CRM 2016 is still using the CRM 2011 forms, and has no support for Business Rules, I'm looking at workflow to solve this problem.

However I found that workflow also does allow running on a Service Activity to monitor for the existence of a Note.

I *can* monitor for the content of a Note, related to a Service Activity, however, that would be irrelevant because by definition, the Note first has to exist to check it's conditions.  And that *is* the whole problem here.

Am I missing an obvious solution to this problem?  Any ideas on how we can better manage this with OOB functionality?

Thank you.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Gary Letter Profile Picture
    1,267 on at

    Daniel,

    I think you would need to use JavaScript or a plug-in to actually prevent the Service Activity from being closed. I don't see a way to do this with workflows.

    One alternative would be to use workflows to re-open the Service Activity and send the Owner an email if it is closed without Notes. This would involve two steps:

    1. Establish a custom two-option field "NotesExist" on the Service Activity, defaulting to "no". Create a workflow that is triggered on the creation of a Note. Have it check whether a Regarding(Service Activity)/Owner contains data, and if so, toggle "NotesExist" to "yes". To prevent timing issues when the Service Activity is re-closed, make this a real-time workflow.

    2. Create a second workflow triggered on a change of Status to Service Activity. Have it check whether "NotesExist" is false AND the Status is closed; if so, change the status to Open and email the Owner to tell them to document their work and close the Service Activity. You may want to create a new Status Reason for this condition, like "Re-opened".

  • Suggested answer
    PS Profile Picture
    23,577 on at

    Hi Daniel,

    Following can be a method without code:

    Step 1: Create a new field on service activity, of 'two options type' (Yes/No) for e.g. Notes Added {Make this field read-only}

    Step 2: Create a real time workflow SA1 on entity NOTES, screenshot below:

    14504.7.PNG

    Update 'Regarding Service Activity' "Notes Added" field to Yes

    Step 3: Create a real time workflow on entity service activity, screenshot below:

    14504.7.PNG

    0841.8.PNG

    Note: This solution might not work on existing service activities. For that, please update all existing service activities, "Notes Added" field to 'No', only if it doesn't have notes otherwise update it to yes 

  • Suggested answer
    PS Profile Picture
    23,577 on at

    After configuration you will be able to see following error, if user is trying to complete service activity without filling in notes

    3162.9.PNG

  • Daniel at VNS Profile Picture
    on at

    Hi Prashant.

    So this was a very creative solution by you, but I do not have it working yet.  Your logic looks sound here and I don't see why this would not work.  I have step 2 working - if the Note added = yes, SA closes normal.  If not, I get the error.   All is good there.

    It's step 1 that is problematic.  I've looked over this repeatedly and cannot see why it doesn't work.  I have tried setting the Notes Added field to the form as both read-only and read-write.  Auditing confirms that some change is being made to the SA, but the Note Added form just stays no and never updates unless I manually change it.  And then step 2 completes as expected.

    11_2D00_16_2D00_2016-6_2D00_54_2D00_36-PM.gif

    11_2D00_16_2D00_2016-6_2D00_54_2D00_36-PM.gif

  • Verified answer
    PS Profile Picture
    23,577 on at

    Hi Daniel,

    In your first screenshot there is something wrong, you are trying to update it with the value which is not yet there :)

    Delete the yellow highlighted part from the field shown on your screenshot 1 and make it like shown below:

    5481.2.PNG

  • Daniel at VNS Profile Picture
    on at

    You are a ninja Prashant.  Thank you.  I was making it overly-complicated, thinking that i had to enter field data in there when all i had to do was click the button!

    11_2D00_16_2D00_2016-8_2D00_07_2D00_22-PM.gif

  • PS Profile Picture
    23,577 on at

    Happy to help !! :)

  • Community Member Profile Picture
    on at

    Hi Prashant,

    I want to make a field mandatory in Service Activity all forms and trying to find Business Rule under SA, please guide, thanks.

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