Problems with form

ken_wsyapken_wsyap Member Posts: 8
edited 2005-02-07 in Dynamics AX
Hi all,

I have created 2 new checkbox in my InventTable. When both the checkbox are ticked, it will return the ItemId. I've wrote overwrite the 'modified' method for both the checkboxes and it will return the 'ItemId'.

The problem is when i checked on both the checkbox for item 'BR-14', it returns the ItemId correctly but when i checked on just one of the checkboxes for 'BR-6' it returns the ItemId as well.

How can i control this? I just want to return just one itemId when both the checkboxes are checked on every line in InventTable.

I hope that you can understand what i'm saying here.


Below is the method which i will call everytime i check or uncheck on the checkboxes.


void returnItemId()
{
InventTable _inventTable;
;

select firstOnly RecId from _inventTable
where checkPurch.value() == noyes::Yes
&& checkSales.value() == noyes::Yes;
info (InventTable.ItemId);

}

Comments

  • MugurMugur Member Posts: 93
    What is the connection between check boxes and inventtable? Supposing they are tied to checkPurch and checkSales fields, you can write:

    void returnItemId()
    {
    InventTable _inventTable;
    ;

    select firstOnly RecId from _inventTable
    where _inventTable.checkPurch == noyes::Yes
    && _inventTable.checkSales == noyes::Yes;

    info (_inventTable.ItemId);

    }

    Good luck
    Mugur
    Kind regards,

    Ciprian Dudau
    Axapta Developer
Sign In or Register to comment.