Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

CustTable Relation

(0) ShareShare
ReportReport
Posted on by 32

Hello everyone.

I have a task to create "AR rep responsible" field on the Customer Form, allowing user to assign AR representative to a specific customer.
I took "Employee Responsible" field in the CustTable table as an example and mimicked the relationship with HcmWorker table the same way (Foreign Key), which created HcmWorker field in CustTable table for me with RefRecId as extended data type.

pastedimage1597156914621v1.png

I then added Reference group to CustTable form and connected to newly created field (HcmWorker) with Replacement Field Group set to Person, which produced the desired effect allowing employee selection on the form (I added it to Sales Demographics tab).

pastedimage1597157143453v2.png

pastedimage1597157571922v4.png

The issue I'm having is that I cannot see my newly created field in the Customer Pool Selection criteria and even though I followed Employee Responsible example something isn't working for me here.

pastedimage1597157224849v3.png

When I try to look at Employee Responsible filed in the drop down I cannot find it as well as it referenced like this: Employee responsible (Record-ID)
pastedimage1597157751136v5.png


Any ideas on what I'm doing wrong or didn't do enough would be greatly appreciated.
Please ask any questions if I couldn't explain the issue correctly. 

Thank you,

Alex

  • Suggested answer
    Sukrut Parab Profile Picture
    Sukrut Parab 71,673 Moderator on at
    RE: CustTable Relation

    If you look at the custCollectionsPool table there is field called querypacked where query is packed. See below line of code when you click the button select pool criteria, so you might have to  update this field

    queryRun = new SysQueryRun(new Query(custCollectionsPool.QueryPacked));

  • Suggested answer
    vinitgoyal2005 Profile Picture
    vinitgoyal2005 6,330 on at
    RE: CustTable Relation

    Hi Alex,

    Customer pool criteria is stored in column in CustCollectionsPool Table.

    Can you please mark the answers verified if issue is resolved?

  • Alex Nach Profile Picture
    Alex Nach 32 on at
    RE: CustTable Relation

    Hi Vinit,

    You are correct. The newly created Customer Pools will display my new field, which means D365 stores existing customer pools criteria and field references. I appreciate your help on this one somewhere.

    After creating relationship, I was able to use Join in Customer Pool to link to HcmWorker using this relationship.

    Then I was able to use filter by Worker. This work around works perfectly.

    Crete Join -> Find relation

    pastedimage1597686314839v3.png

    Create Join
    pastedimage1597686250741v2.png

    Range selection
    pastedimage1597686225179v1.png

    Thank you again.

    Alex

  • Alex Nach Profile Picture
    Alex Nach 32 on at
    RE: CustTable Relation

    Tried that but was missing datasrouce name and this is probably why it didn't work for me originally. Let me try your way.

    Thanks,

    Alex

  • Suggested answer
    vinitgoyal2005 Profile Picture
    vinitgoyal2005 6,330 on at
    RE: CustTable Relation

    Hi Alex,

    I recreated the same thing which you did and it still doesnt show the newly created worker in the customer pool criteria. so I checked the code and added extension like below:

    [ExtensionOf(tablestr(CustCollectionsPool))]
    final class CustCollectionsPool_Extension
    {
    
        public static Query defaultQuery(CustPoolType _type)
        {
            Query q = next defaultQuery(_type);
            QueryBuildDataSource custDs;
            custDs = q.dataSourceName(tableStr(CustTable));
            custDs.addRange(fieldNum(CustTable, TestWorker));
    
            return q;
    
        }
    
    }

    Once this code is added, I created a new Customer pool and I can see the Test worker which I created. but I still cannot select the Test worker on old pools.

    pastedimage1597352652367v3.png

    Though I am not sure why it doesn't show in list,Hope this help you resolve the issue.

    You may also want to create a Bug with Microsoft support.

  • Alex Nach Profile Picture
    Alex Nach 32 on at
    RE: CustTable Relation

    Yes Uday. I have the right model there.

    I want to clear something out though guys. So the idea is to set Customer Pool select criteria (to point to AR Rep) so it could be passed to Aged Balance page where AR sees only his/her accounts.

    When I go to Credit and collections - > Setup -> Customer Pools and then select specific Pool and want to modify Select pool criteria
    pastedimage1597330887422v1.png

    I do not see my filed there.

    pastedimage1597330943792v2.png

    Now, if I click on "Preview customer pool" button and taken to Aged Balance (CustCollectionsPoolsListPage) page and click on Advanced filter or sort button I see it in there.

    pastedimage1597331060184v3.png

    Maybe CustCollectionsPool form has something special that needs to be added/completed?

    Thanks,

    Alex

  • Alex Nach Profile Picture
    Alex Nach 32 on at
    RE: CustTable Relation

    Yes, of course.

    pastedimage1597330380238v1.png

    Thank you.

    Alex

  • udaY-ch Profile Picture
    udaY-ch 4,624 on at
    RE: CustTable Relation

    Hi,

    Have you updated personnel core model as reference to your custom model.

    Uday

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: CustTable Relation

    Is your field set to Vibile: Yes in the table?

  • Alex Nach Profile Picture
    Alex Nach 32 on at
    RE: CustTable Relation

    Hi Uday.

    I followed your directions and I still don't see it there. Could it be something with configuration?

    Thank you,

    Alex

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,969 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,842 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans