Other Languages - Axapta question Dynamics AX - Asked By arcis mendi on 29-Feb-12 02:25 PM

Earn up to 30 extra points for answering this tough question.
Hi

I am trying to modify an inventory form that you can change dimensions from the inventroy dimensions screen.  I created a new calculated field using a select statement from the inventtrans table but the form needs to be changed according to the user's dimension preference.   I am not sure how to achieve this.

select sum(Qty)
    from _inventTrans

Thank you,
Somesh Yadav replied to arcis mendi on 01-Mar-12 12:21 AM

To check folder existence you can use WinApi::pathExists,
to create one WinApi::createDirectory or WinApi::createDirectoryPath:

str  path = 'C:\\tmp\\aFolder';
;
if (!WinApi::pathExists(path))
{
    WinApi::createDirectoryPath(path);
}

I have no idea what is meant by "the appropriate file", but have a look at the TextIO, BinaryIO or the other *IO classes.

[)ia6l0 iii replied to arcis mendi on 01-Mar-12 08:59 AM

According to me, this does not need to be done through database. It would just be a form setting.

 

First of all, the form should be resizable. So as per MSDN link, To make a form resizable, set the Height property on the form Design node to Column height, and then set the Width property to Column width.

 

If you have any other controls inside, set the inner control "width" property to "Column width" the "height" to "Column height". That should set the width and the height. Let me know if I have misunderstood.

arcis mendi replied to [)ia6l0 iii on 01-Mar-12 03:59 PM
Hi I think you guys completely misunderstood what I am trying to achieve. 

Lets say the user chose itemid from the inventory dimension (Scenario1)

Item Id       Quantity A    Quanity B
1            5000         100

The user added site id to the form (Scenario2) and say item exists in two sites

Itemid  Site   Quantity A   Qantity B
1     A      2000      70
1     B      3000     30

See how measures changed dynamically.  I am trying to achieve this via a select query but I do not know how to use #inventdimjoin macro.