Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

URGENT HELP NEEDED!

Posted on by Microsoft Employee

Hello everyone. I have a contract entity that looks like this:

Contract-entity_2E00_.PNG

Inside the contract entity, I have contract lines with a N:1 relationship to the contract entity. My contract lines look like this:

Contract-lines.PNG

As you can see inside my contract lines, I have two fields that stipulate if the contract line order is for AM SNACK/LUNCH/PM SNACK (Under serving time).

I want to take the data in each contract and spit out a table that looks like the table below. This would be adding each day's orders from the contract lines and printing the total in the table (Center group is the same as Serving group in the contract lines).  The table would be for the entire contract, but would use the contract lines to generate the totals. If I had many contracts, many tables like this should be generated:
7563.Report.png

Inside the contract lines, I only have what's ordered for the week, even though the invoice is for the entire month. I took care of this by multiplying the total weekly by 4 and inserting it into the quantity field. This is because the number of units ordered for each separate week is the same. 

My question is how on earth do I get Dynamics 365 to generate something like the table above from what I have inside each contract(with contract lines). I don't think this can be done using word/excel templates. I am thinking I would have to create a new entity and get it to generate these reports using processes/workflows. If not, then I could probably build a plugin. I just don't know the route to take here. Any help from the experts would be greatly appreciated!!

Categories:
  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: URGENT HELP NEEDED!

    Send on brother!

  • RE: URGENT HELP NEEDED!

    Unfortunately, I cannot share the whole code since it is paid by a client, but I can send you an email with few JavaScript functions as an example of collecting the data and generating html content to present.   

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: URGENT HELP NEEDED!

    Yeah that might actually work, I'm going to try it... If you want to help me out, could you please share the code you used, it would make my life a lot easier!

    Thanks in advance.

  • Suggested answer
    RE: URGENT HELP NEEDED!

    I have used web resources to generate reports for a kind of similar problem. With a JavaScript, you can collect the data from CRM using fetchXml, and an html file presents the data to the user. You can collect the data with multiple service calls and massage them, based on your need. That way, there is no need to maintain the data of another custom entity.  In my case, number of records were several thousands, and performance was still acceptable. Just an option...

  • Suggested answer
    Ben Thompson Profile Picture
    Ben Thompson 6,350 on at
    RE: URGENT HELP NEEDED!

    Something like the pivot columns in docs.microsoft.com/.../desktop-common-query-tasks should work..

    BI was something I used to work in but I'm rather rusty nowadays...

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: URGENT HELP NEEDED!

    Do you know if Power BI can actually achieve that? If so, how?!

    I don't want to put together a plugin if I don't have to!

  • Suggested answer
    Ben Thompson Profile Picture
    Ben Thompson 6,350 on at
    RE: URGENT HELP NEEDED!

    I suspect your only options are either a Power BI report or as you suggested a custom entity with a plugin to create/ update and re-calculate the figures as they change..

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans