Sunday, 18 October 2015

Multi selection records in form level

when we select multiple record in form it will select 
if not selected means it will take active record 

put button property set as multiple select is yes


void clicked()
{
    MSSpindleLabelView  MSSpindleLabelViewlocal;
    MSSpindleLabelViewlocal = MSSpindleLabelView_ds.getFirst(1);
    if (MSSpindleLabelViewlocal)
    {
    while (MSSpindleLabelViewlocal.InventTransTableRecId != 0)
    {
        info(strFmt("%1 ",MSSpindleLabelViewlocal.InventTransTableRecId));
        MSSpindleLabelViewlocal = MSSpindleLabelView_ds.getNext();
    }
    }
    else
    {
        while select MSSpindleLabelViewlocal where MSSpindleLabelViewlocal.InventTransTableRecId == MSSpindleLabelView.InventTransTableRecId
        {
            info(strFmt("%1 ",MSSpindleLabelViewlocal.InventTransTableRecId));
        }
    }

    super();
}



example:


void clicked()
{
    InventTrans  InventTranslocal;
    InventTranslocal = InventTrans_ds.getFirst(1);
    if (InventTranslocal)
    {
    while (InventTranslocal.RecId != 0)
    {
        InventTrans_ds.AutoTmpCreate(true, InventTranslocal, NoYes::Yes);
        InventTranslocal = InventTrans_ds.getNext();
    }
    }
    else
    {
        while select InventTranslocal where InventTranslocal.InventTransOrigin == InventTrans.InventTransOrigin
        {
            InventTrans_ds.AutoTmpCreate(true, InventTranslocal, NoYes::Yes);
        }
        InventTransOriginMovement_ds.research(true); // for refersh the datasource
    }

    super();

}



No comments:

Post a Comment