web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Procurement category tree look up

(1) ShareShare
ReportReport
Posted on by 204
Hi,

The requirement is to get the tree look up procurement category which is available in prodtable form into my custom form. 
I have added the int64 field and have given relation with ecorescategory.recid. 
I have written in form datasource's field methods: resolvereference() and lookupreference().
I have followed similar to: https://www.youtube.com/watch?v=abf4IGAVVm0

But I'm unable to see tree look up and it just displays normal look up of record id. what am I missing here?
I have the same question (0)
  • Martin Dráb Profile Picture
    239,634 Most Valuable Professional on at
    When you say "which is available in prodtable form", which form control in ProdTable form do you mean?
  • RSX Profile Picture
    204 on at
    Hi,
    My bad, it is in purchtable form, Field name is "Procurement category", control : PurchLine_ProcurementCategory
  • Verified answer
    Martin Dráb Profile Picture
    239,634 Most Valuable Professional on at
    To see how it's implemented for ProcurementCategory in PurchTable form, expand PurchLine data source, then ProcurementCategory field and open lookupReference() method. There you'll see a call of EcoResCategory::lookupCategoryHierarchyRole(), which is what you'll need.
  • RSX Profile Picture
    204 on at
    I've written the methods as following, still unable to get the tree look up.
                public Common resolveReference(FormReferenceControl _formReferenceControl)
                {
                    Common ret;
                    ret = EcoResCategory::resolveCategoryHierarchyRole(_formReferenceControl,EcoResCategoryNamedHierarchyRole::Procurement);
    
                    return ret;
                }
    
                public Common lookupReference(FormReferenceControl _formReferenceControl)
                {
                    
                    Common ret;
    
                    ret = EcoResCategory::lookupCategoryHierarchyRole(_formReferenceControl, EcoResCategoryNamedHierarchyRole::Procurement);
                    
                    return ret;
                }
     
  • Martin Dráb Profile Picture
    239,634 Most Valuable Professional on at
    Is your control a reference group? Or Int64Edit?
  • RSX Profile Picture
    204 on at
    It is an Int64 Edt.
  • Verified answer
    RSX Profile Picture
    204 on at
    Hi Martin,

    I removed the int64 control and used reference group and it works well now. 

    Thank you.
  • Martin Dráb Profile Picture
    239,634 Most Valuable Professional on at
    Good to hear that problem is resolved. Please don't forget to verify the answer (mark the reply or replies that form the answer).
  • RSX Profile Picture
    204 on at
    Hi
    I've tried to verify the answer. But the page just keeps loading and doesn't mark it. I've tried it for 2 days. Still its not getting marked. 

  • Martin Dráb Profile Picture
    239,634 Most Valuable Professional on at
    Unfortunately, there is a bug that apparently hasn't been fixed yet. :-(

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 802

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 636 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 534

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans