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 :
Microsoft Dynamics AX (Archived)

Add VendorBatch to from

(0) ShareShare
ReportReport
Posted on by 159

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

I have the same question (0)
  • Crispin John Augustine Profile Picture
    37,081 on at

    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()

  • Vladislav Profile Picture
    159 on at

    Hi Crispin,

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

  • Crispin John Augustine Profile Picture
    37,081 on at

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

  • Vladislav Profile Picture
    159 on at

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

  • Crispin John Augustine Profile Picture
    37,081 on at

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

  • Vladislav Profile Picture
    159 on at

    5810.ax2.jpg

  • Verified answer
    Crispin John Augustine Profile Picture
    37,081 on at

    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
    159 on at

    6153.ax2012.jpg

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

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 26

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans