Powered By Blogger

How to filter product number based on condition

Navigation:-

     InventoryManagement -> InBound Transfers - > TransferOrders

       under we find TransferOrders click one transfer order you find below page

  




here you find warehouse in header level , in line level Add Products when we click add products RetailAddItem form will be opened in that form grid is filter based on quantity of itemid and wrehouse 


code:-
 


ware - 13
[ExtensionOf(formDataSourceStr(RetailAddItems, EcoResProduct))] 
final class EcoResProduct_EQ_Extension
{
   public void executeQuery()
   {
       next executeQuery();
       Query query;
       QueryBuildDataSource qbds, qbds1, qbds2;
       InventTransferTable    inventTransferTable;
       InventTransferLine     inventTransferLine;
       FormRun formRun = this.formRun();
       FormRun callerForm = formRun.args().caller();
       if (callerForm && element.args().caller().name() == formStr(InventTransferOrders))
       {
           inventTransferTable = callerForm.dataSource(1).cursor() as InventTransferTable;
           inventTransferLine = callerForm.dataSource(2).cursor() as InventTransferLine;
       }
      
       qbds  = this.query().dataSourceTable(tableNum(EcoResProduct));
       qbds1 = qbds.addDataSource(tableNum(InventSum));
       qbds1.relations(false);
       qbds1.joinMode(JoinMode::ExistsJoin);
       qbds1.addLink(fieldNum(EcoResProduct, DisplayProductNumber), fieldNum(InventSum, ItemId));
       qbds1.addRange(fieldNum(InventSum, InventLocationId)).value(inventTransferTable.InventLocationIdFrom);
       qbds1.addRange(fieldNum(InventSum, AvailPhysical)).value(">0");
     
   }
}

      



No comments:

Post a Comment

DisableStandredButton

 My requirement is to disable the delete button for journals that were posted:- After Posting the button is enabled fig:- Line level also th...