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

Notifications

Announcements

No record found.

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
    237,990 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
    237,990 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
    237,990 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
    237,990 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
    237,990 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 669 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 384 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans