Skip to main content

Notifications

Community site session details

Community site session details

Session Id : LqUDHh25z3o660yiBhz5It
Power Apps - Building Power Apps
Unanswered

Creating an app that shows a selected customer's work order history from Dynamics 365 CRM

Like (0) ShareShare
ReportReport
Posted on 22 Sep 2023 16:19:06 by 4

Hey All,

 

I've been trying to build a small app to work with our CRM and came up with the idea of a work order app that can give one of my coworkers the entire work order history for a particular customer.

 

What I currently have is a home screen, another screen with a gallery for the contacts, another screen with a customer detail form page, and the same for work orders (5 screens in total). I am finding it a little difficult to make a button to see a gallery of the work orders tied to the customer we have in the system. I am hoping for a little help in trying to either make a button do the sorting or if there is some filtering step I am missing in the work order gallery.

 

Any help would be greatly appreciated! 

  • JarredL Profile Picture
    4 on 02 Oct 2023 at 21:01:49
    Re: Creating an app that shows a selected customer's work order history from Dynamics 365 CRM

    Update,

     

    Today I tried to set the button's OnSelect to be:

     

    UpdateContext({vFilter:'DataCardValue1'}) //This hopefully set the contact name to a variable

     

    and the galWork Items to be:

     

    Filter(galWork,vFilter in PrimaryContactName_DataCard2) //hoping to filter the gallery by the variable. 

     

    DataCardValue1 is where the customer's name is stored in the customer table.

    PrimaryContactName_DataCard2 is where the customer's name is stored in the work order table.

     

    I believe to be on the right track but still coming up short. again, any assistance would be appreciated. Thank you for the help and your time.

  • JarredL Profile Picture
    4 on 02 Oct 2023 at 19:48:29
    Re: Creating an app that shows a selected customer's work order history from Dynamics 365 CRM

    Hey, thank you for reaching out and sorry for the late reply. 

     

    I appreciate the assistance; however, I believe I may have failed to give enough information on the situation as I am unsure of what you mean by this. I apologize for this as I am still a new user.

     

    We use dynamics 365 as the source of data for our company. We mostly use it for work order and customer management. There are views for both contacts and work orders. There is also a column in the work order view where customers tied to the work order are and is the reason why I thought this would be a very nice app to tie the two together. 

     

    In PowerApps currently have a gallery for work orders (galWorkOrder) on one screen, a gallery for contacts (galContacts) on another screen, and detail screens for work orders and contacts with forms tied to their respective galleries. When you click on the item in the gallery, it will take you to the corresponding screen with its information populating a form on the new screen.  

     

    I have a button on the contact detail screen called "Work History". The goal was to filter the work order gallery by the "contact name" field in the contact detail form which is called "primary contact" in our work orders. What I currently have the OnSelect for the button set to is as such: 

    Set(varCurrentRecord, ThisItem);
    EditForm(frmContactDetails);
    Navigate('Work Order Screen');

     

    This has been throwing errors though and is my reason for turning to this site for help. With your prior comment, would I need to use the gallery.select command on the button and or change the gallery on work orders to accomplish this task. 

     

    Thank you again for the assistance!

  • Michael E. Gernaey Profile Picture
    42,076 Super User 2025 Season 1 on 22 Sep 2023 at 17:33:47
    Re: Creating an app that shows a selected customer's work order history from Dynamics 365 CRM

    Hello,

     

    Once the person selects the Customer in the Gallery, that's all you need.

     

    You should be able to Filter the screen that shows all the list of work orders by the customerid (or aka contantid/accountid).

     

    So on your Customer Detail, I am assuming you are using the GalleryXXX.Selected from the Contact List to populate the View of data?

     

    Do the same for your work orders.

     

    Apologies, I could be missing what you want :-0) but I hope that helps. Let me know.


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 106 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 73

#3
stampcoin Profile Picture

stampcoin 52

Overall leaderboard
Loading started