Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Suggested answer

Account - view filter by 2 different work order filed statuses

Posted on by 75

Need to know if i can do this with a simple view filter. 

I have 1 x Account with multiples work orders. 

I want to create an account view based on 2 different work orders (child records). 

So i have ACC-A and WO-A and WO-B

I want a list of all accounts where WO-A has a system status of Close-Posted

AND

Where WO-B has a system status value of open-scheduled. 

I works well for one or the other but is there an easy out of the box way to make it check the 2 x WOs? 

So i want to check 2 x child work order statuses. 

Thanks

  • Al Iggs Profile Picture
    Al Iggs on at
    RE: Account - view filter by 2 different work order filed statuses

    Hi Trying, did you get this resolved?

  • Suggested answer
    Al Iggs Profile Picture
    Al Iggs on at
    RE: Account - view filter by 2 different work order filed statuses

    This challenge really made me curious, so I tried it on my instance. Here's what I did: I used Advanced Find to create your conditions, I used 

    WO Type=Diagnosis (#1) and Status=Closed-Posted (#2)

    WO Type=Inspection (#3) and Status=Open-Scheduled (#4)

    both lines grouped with AND. Does this mimic your requirement?

    Of course this does not give you the correct result, b/c it will basically AND-combine all 4 conditions, giving you 0 matches.

    I then saved the view definition and opened the View Designer in the XRM Toolbox. Advanced Find adds a "link-entity" for work order with 4 conditions. I changed this into 2 "linked-entity" branches for work order with conditions #1 and #2 in the 1st branch and #3 and #4 in the 2nd branch. Saved and published the new view definition and BOOOM, my view shows exactly the one account that has both work orders associated.

  • LuHao Profile Picture
    LuHao 40,872 on at
    RE: Account - view filter by 2 different work order filed statuses

    Hi partner,

    Unfortunately, it's impossible to achieve it by simply using filtering with advanced find.

  • Trying Profile Picture
    Trying 75 on at
    RE: Account - view filter by 2 different work order filed statuses

    Thank you for you great response with screenshots etc.

    I am aware of this way though and should have mentioned i will just checking there was no other way of doing it via a filter only?

    Thanks

  • Suggested answer
    LuHao Profile Picture
    LuHao 40,872 on at
    RE: Account - view filter by 2 different work order filed statuses

    Hi partner,

    To achieve it, we have to create some custom fields and workflows.

    Step 1. Create two new fields for Account, one to indicate whether there is related Close-Posted WO-A, and the other to indicate whether there is related Open-scheduled WO-B.

    pastedimage1587369000251v1.png    pastedimage1587369094462v3.png

    Step 2. Create two workflows for Work Order, one is on-demand workflow.

    1) Normal workflow.

    pastedimage1587370274074v17.png

    Scope: Organization. Start when: Record is created, Record fields change (Service Account).

    pastedimage1587370111155v15.png

    If

    pastedimage1587369706912v7.png

    then

    pastedimage1587369816910v9.png

    Else if

    pastedimage1587370083632v14.png

    then

    pastedimage1587369862566v11.png

    Activate the workflow.

    2) On-demand workflow.

    Same as the setting of the previous workflow.

    pastedimage1587370063861v13.png

    Activate the workflow.

    Step 3. Run the on-demand workflow for all existing Work Orders.

    pastedimage1587370336249v18.png

    If there are a large number Work Order records, then I recommend that you use XrmToolBox's Bulk Workflow Execution tool to execute workflows in batches.

    Step 4. Create a view. The filter condition is that the two custom fields of Account are both Yes.

    pastedimage1587370530709v19.png

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans