Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Product hierarchy

(0) ShareShare
ReportReport
Posted on by 45

Suppose I've created a product A and it has area field and value of 300 sq ft

Now I want that the child product of A should not exceed this (Area) sq ft and if some other child exist the sum should not exceed the Area of parent product A I.e 300 sq ft

 How can I do it...any idea or solution you can think of?

  • Suggested answer
    Virendra Agrawal Profile Picture
    150 on at
    RE: Product hierarchy

    Hello,

    There could be multiple solutions to this scenario.

    1. We could achieve it by using custom plugins

    • Create an additional field on the parent product record (say total sum area) to keep the sum of area values from the children records. You could also use a roll-up field (but this needs to be forced to recalculate after each child record creates) or create a plugin to sum the area from children.
    • Create a plugin to trigger upon the creation of a child record and check if the Total area (by retrieving all existing children and a new record) exceeds the total sum are on the parent record. if yes,  throw an error.

    2. We could also try to use the combination of roll-up, calculated field and Sync workflow (but here we will need to ensure that roll-up is always updated).

    • Create a rollup field on the parent product record (say total sum area) to keep the sum of area values from the children records. 
    • Create a calculated field to keep the remaining area value from the 'total sum area' and the main area.
    • Create a sync workflow to trigger on create of child record to check if the area value provided on the child record is greater than the remaining area field value on the parent. If yes, stop the workflow (which will throw an error.

    Hope this helps.

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!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 78 Super User 2025 Season 1

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 72

Overall leaderboard

Product updates

Dynamics 365 release plans