Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Workflow start when record is deleted

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, thank you so much for your time reading this post. I´m getting familiar with the options for automatic processes that a workflow has OOTB. Currently, I want to delete a value from a field when a record is deleted from a grid. For that purpose I have a synchronous workflow that updates certain fields in order to remove its content but those values are not getting removed. I have already checked the box -Record is deleted- in the options for automatic processes. My question is, am I missing something else when setting up the workflow? How does the CRM knows the record has been deleted from a grid?

Thank you in advanced. Any help will be appreciated.

*This post is locked for comments

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Workflow start when record is deleted

    Glad it is solved. If you have a workflow set to scope organization and trigger on delete then it *will* execute and perform the action within the workflow. If you share a screenshot of your workflow, I can take a look.

    PS: If you add ("Hi Ravi") to your post while replying then I will get direct notification :)

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Workflow start when record is deleted

    Thank you so much for your quick response, the documentation really helped me to figure out how to solve it. I changed the entity in the data origin, now I can delete the record from the grid and CRM asks if I´m sure to delete it. Although the issue is solved, I still can´t figure out why the worfklow never deleted the value of the field. I would really appreciate if you advice me with some basic hints to execute a workflow of this kind in the future. Currently its scope is at Organization, start when Record is deleted and is set to run on real time.

  • Suggested answer
    gdas Profile Picture
    gdas 50,089 on at
    RE: Workflow start when record is deleted

    Although I am  not very much clear about your requirement , if my understanding is correct you don't want to delete the record rather you will update some value Of the field  in that record  when user try to delete? If so you can't restrict deletion of the record in synchronous workflow , without stop workflow action.

    If you want to delete the record but  before delete you want to set some value to another record in that case make sure  you have  have lookup reference to the entity which you want to update ,  which means N:1 relationship with  the entity which you want to delete.

    You can try to  write pre-validation plugin for your requirement which definitely works for your scenario.

  • Verified answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Workflow start when record is deleted

    Hi,

    Deleting the record from a subgrid doesn't mean that the record is always be deleted. It depends upon the relationship between the entities i.e. if it is many to many then only the link between the entities will be deleted and if the relationship is 1:N then the actual record will be deleted.

    Read more here: docs.microsoft.com/.../sub-grid-properties-legacy

    Now, there could be some other reason why your workflow is not triggering. One can be that you have the scope of the workflow set to user but the workflow is executing with some other user. There could be other reasons as well.

    If the record is deleted and the workflow is set to trigger on delete then the workflow must be triggered. If you still can't figure out then please share some more specifc details(with screenshot) to assist further.

    Hope this helps.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,492 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans