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)

Run workflow on inactive records

(0) ShareShare
ReportReport
Posted on by 1,328

Is there ANY way to run a workflow that will update inactive records? In this case on Orders. I could add a step to activate the order record, update, then deactivate to previous status - but that messes up our processes that run against GP.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mihir Maruti Kadam Profile Picture
    702 on at

    1. create a plug in and run in context of system user(special user in crm) . System user do not have any restrictions. So it can update any read only records.

    2. Another option,  try to run workflow in context of system user (workflow owner ). Select owner record from disabled users view.

  • epark06 Profile Picture
    1,328 on at

    [quote user="Mihir Maruti Kadam"]

    1. create a plug in and run in context of system user(special user in crm) . System user do not have any restrictions. So it can update any read only records.

    2. Another option,  try to run workflow in context of system user (workflow owner ). Select owner record from disabled users view.

    [/quote]

    Could you please elaborate? The workflows are on-demand and the users that will be running them are not system users.

  • Verified answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi,

    All users of CRM are system users. If they're triggering the workflow, it is a system user. I believe he means to run them as SYSTEM - it's a designated user in CRM that plugins can run as.

    You can update some custom entities through code when they're inactive, but orders are a special case. Orders cannot be updated in any way when they're inactive, they can only be reactivated. If you want to update the order without reactivating it, you'll need to do it through the database. You could have a custom workflow assembly hit your database directly and make the change if you register the assembly Not in Isolation. You could also set up a web service that calls the database. In your plugin, you call out to the web service. That way you could register the plugins in Isolation.

    None of that last paragraph is supported but that's what you could do to meet your requirement.

    Hope this helps! I'd appreciate if you'd mark this as Answering your question.

    Thanks,

     Aiden

  • epark06 Profile Picture
    1,328 on at

    [quote user="Aiden Kaskela"]

    Hi,

    All users of CRM are system users. If they're triggering the workflow, it is a system user. I believe he means to run them as SYSTEM - it's a designated user in CRM that plugins can run as.

    You can update some custom entities through code when they're inactive, but orders are a special case. Orders cannot be updated in any way when they're inactive, they can only be reactivated. If you want to update the order without reactivating it, you'll need to do it through the database. You could have a custom workflow assembly hit your database directly and make the change if you register the assembly Not in Isolation. You could also set up a web service that calls the database. In your plugin, you call out to the web service. That way you could register the plugins in Isolation.

    None of that last paragraph is supported but that's what you could do to meet your requirement.

    Hope this helps! I'd appreciate if you'd mark this as Answering your question.

    Thanks,

     Aiden

    [/quote]

    Thanks Aiden. Then can you perhaps guide me on how I would "mark" an Order if it has services related to it? What I had previously was to run a workflow that checks a "Contains Services" box when Services on a related Order is created. However, this was running when the order was already inactive. End goal is to filter out which orders contains services.

  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Where are you trying to see the results? If you want it in a view (orders without a service), you can get that if you install Intelligent Query from Cobalt (www.cobalt.net/.../cobaltintelligentquery) In the advanced find, you can look for orders and link to services, where service does not contain data. Normally this won't return any results, but if you install IQ, it'll bring back orders with no service.

    Thanks,

     Aiden

  • epark06 Profile Picture
    1,328 on at

    [quote user="Aiden Kaskela"]

    Where are you trying to see the results? If you want it in a view (orders without a service), you can get that if you install Intelligent Query from Cobalt (www.cobalt.net/.../cobaltintelligentquery) In the advanced find, you can look for orders and link to services, where service does not contain data. Normally this won't return any results, but if you install IQ, it'll bring back orders with no service.

    Thanks,

     Aiden

    [/quote]

    Wow, I didn't know something like that was out there that was free. Thank you so much!

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