Tuesday, November 21, 2017

MULTISELECT VALUES FROM GRID AND EXECUTE ONE BY ONE :VIKAS MEHTA : MICROSOFT DYNAMICS AX x++ CODE MULTISELECT IN FORMS

MULTISELECT VALUES FROM GRID AND EXECUTE ONE BY ONE  :VIKAS MEHTA : MICROSOFT DYNAMICS AX x++ CODE MULTISELECT IN FORMS

Multiple select location warehouse ax x++ code helper class multiselect
Just write the below code on the clicked method event and the code will consider all the selected records in the grid and execute as per the requirement.
void clicked()
{
    InventLocation InventLocationLoc;
    MultiSelectionHelper helper = MultiSelectionHelper::construct();

    super();

    helper.parmDatasource(InventLocation_DS);

    InventLocationLoc = helper.getFirst();
    while (InventLocationLoc.RecId != 0)
    {
        select firstOnly selectWH where selectWH.InventLocationId == InventLocationLoc.InventLocationId
        ;
        if(!selectWH)
        {
            // your execution here
        }
        else
            info(strFmt("@VIK178",selectWH.InventLocationId));//warehouse already exist
        InventLocationLoc = helper.getNext();
    }

    info("warehouse assigned”);
}

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...