Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Add VendorBatch to from

Posted on by 155

Hi everyone,
I use ax2012 r3. 
Form : InventOnhandItem

Data Source - > contains InventDim , InventSum and etc

There is a method added in the InventSum(table) , which works perfectly.

methods's source:

display PdsVendBatchId  inventBatchPdsVendBatchId()
{
    InventDim   inventDim;
    ;
    inventDim = this.joinChild();
    return InventBatch::find(inventDim.inventBatchId,this.itemId).PdsVendBatchId;
}

Also have :

Form : InventTransItem
Data Source -> contains InventDim and  etc. I add InventBatch(table)
In InventBatch table create method as above with the same code , but when I was debug InventTransItem(form) and go  inventBatchPdsVendBatchId(method) -> inventDim.inventBatchId is empty , but in the other form(InventOnhandItem) it is not empty.

what to add to work ?

My task:  add one more column in InventTransItem(form) to show VendorBatch.


Best Regards

*This post is locked for comments

  • Vladislav Profile Picture
    Vladislav 155 on at
    RE: Add VendorBatch to from

    6153.ax2012.jpg

    I choose inner join , but nothing happens in method. I check in SQL and have records with inner join.

  • Verified answer
    Crispin John Augustine Profile Picture
    Crispin John Augustine 37,081 on at
    RE: Add VendorBatch to from

    That's wrong. (not in the table)

    In the form InventTransItem >> Datasources >> InventBatch >> You see the property "Joinsource"?

    There you have to select InventDim.

  • Vladislav Profile Picture
    Vladislav 155 on at
    RE: Add VendorBatch to from

    5810.ax2.jpg

  • Crispin John Augustine Profile Picture
    Crispin John Augustine 37,081 on at
    RE: Add VendorBatch to from

    could you share a screenshot of what you just did? I'm not sure if you did it right

  • Vladislav Profile Picture
    Vladislav 155 on at
    RE: Add VendorBatch to from

    In the table "InventBatch" in relations make new relation , but nothing happens.

  • Crispin John Augustine Profile Picture
    Crispin John Augustine 37,081 on at
    RE: Add VendorBatch to from

    In the datasource 'InventBatch' joinsource, select InventDim. I'm not sure of the join type. It depends on your structure

  • Vladislav Profile Picture
    Vladislav 155 on at
    RE: Add VendorBatch to from

    Hi Crispin,

    Would you tell me how to join InventBatch with InventDim in this case.

  • Crispin John Augustine Profile Picture
    Crispin John Augustine 37,081 on at
    RE: Add VendorBatch to from

    have you joined the datasources InventBatch and InventDim on the first place?  (My guess, you haven't)

    And you don't Need the Code line inventDim = this.joinChild()

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans