Open Packing slip posting form when updating Generate picking list

 Functional Process:

  • Creating Picking list registration.

  • After creating a picking list registration, to update the picking list registration click on Update then Handling status becomes Completed. For posting this picking list user clicks on the Post packing slip.
  • Requirement: On the Update button Post packing slip form should be open. 
     Post packing slip form is opened on the Update button.



Technical Background:  
  • Create CoC of Update button as below:
[ExtensionOf(formcontrolstr(WMSPickingRegistration, PickAllButton))]
final class ERWMSPickingListRegistration_PickAllButton_Extension
{
    /// <summary>
    /// This method is used to Populate Post packing slip form
    /// </summary>
void clicked()
    {
        WMSPickingRoute wmsPickingRoute;
        SalesTable      salesTable;
        MenuFunction    menuFunction;
        FormRun         caller;
        
        Args args = new Args();
        
        next clicked();
        
        wmsPickingRoute =  this.formRun().dataSource(formDataSourceStr(WMSPickingRegistration,WMSPickingRoute)).cursor();
        caller          = this.formRun().args().caller();
        
        if (wmsPickingRoute.transType == InventTransType::Sales)
        {
            salesTable = salesTable::find(wmsPickingRoute.transRefId);
        
            args.caller(caller);
            args.record(salesTable);
        
            menuFunction = new MenuFunction(menuitemActionStr(SalesFormLetter_PackingSlip), MenuItemType::Action);
            menuFunction.run(args);
        }
       
}

}




Comments

Popular posts from this blog

Assembly reference containing type is not referenced, Object 'CLRObject' could not be created

Send email using .Net framework

Extract data of PO from the System in Ax 2012