Skip to main content

Notifications

Announcements

No record found.

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

get parent of parent id - look up field value in a calculated field

(0) ShareShare
ReportReport
Posted on by 34

Hi 

I have a classification entity (similar to the product catalog ) that includes parent classification id. 

using this classification entity, i can create a product sector, product subsector, and product records.

Product is a child of product subsector. The product subsector is a child of the product sector. 

I try to rename the Colum tile of a view (image 1) using a calculated field following the instruction from the link, https://powerusers.microsoft.com/t5/Microsoft-Dataverse/Renaming-column-headers-in-an-entity-view/m-p/668202#M7018 

 I was able to create a calculated field to display Product sub sector (image 1). However, any suggestion on how can I get the Product Sector name (parent.parent.name). 

Thank you, Siva

image 1

pastedimage1626137951301v4.png

image 2

pastedimage1626137777360v3.png

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: get parent of parent id - look up field value in a calculated field

    Hi SivaR,

    You can refer following link for calculated fields considerations:

    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/define-calculated-fields?view=op-9-1#calculated-fields-considerations 

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • SivaR Profile Picture
    SivaR 34 on at
    RE: get parent of parent id - look up field value in a calculated field

    Thank you for the response. 

    Based on the current database structure, i am able to create a view to display product sub sector (classification.parentclassification as per image 1) and Product sector (parentclassification(classification).parentclassification as per image 2 ). However, the system doesn't allow me to create calculated field to select parentclassification(classification).parentclassification. Why it is working in view and not in the calculated field? 

    image 1

    pastedimage1626292153579v2.png

    image 2

    pastedimage1626292217686v3.png

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: get parent of parent id - look up field value in a calculated field

    Hi SivaR,

    As you mentioned, “Product is a child of product subsector. The product subsector is a child of the product sector.

    Maybe you can create a new 1:N relationship between Product and product sector, so one new product sector lookup field can be added into product entity.

    Then you can copy original product sector lookup field value from product subsector to new product sector lookup field of product automatically.

    Finally, you can create another new calculated field to display Product sector just like your previous operation for Product sub sector.

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,379 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans