How do i group order lines by name and get the last created record from each group and clone that line?
Hello,
Can you elaborate your requirement more.
Thank you,
Amit Katariya
Yes.
I have an order. In that order i have products. Each product has a contract from and to date. For each product I have as many lines as long as the contract is active (for each month) .
Now, i have to group these products by name and find each product's last created line and clone that line.
Can you share some screenshots if possible. because as per above explanation is it possible that a user can add same product multiple times(Not talking about the quantity but number of product rows)?
Yes, its not about the quantity. For example we have a contract for internet that its duration is 12 months. For each month we need to create a new line of the product. That is why we need to find the last created line of each product and based on that to clone that last line for each product. (if the contract is still active of course)
If you want to achieve your requirement using Plugin c# code then please see my blog for Group by usage in Fetchxml
xrmdynamicscrm.wordpress.com/.../
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
MVP-Daniyal Khaleel 125
Tom_Gioielli 121 Super User 2025 Season 2
Erin Lubben 73