if a sales order is invoiced before it is conformed, then system should warn the user to conform the sales order first

any sales order should be conformed first then only the conformed sales order can be invoiced, or packing and packing slip can be done

if any user is directly invoicing or picking the so with out conformation then system should warn saying this so is not conformed.

plz suggest me !!!

Hi santhosh,

you can achieve your requirement in two ways.

  1. Afetr creating the SalesOrder Posting button will show only Confirmation menuitem then once confirmed the SO, it will show the Packingslip and Invoice posting button .

if you choose this then follow the below steps,

AOT-> Forms → Salestable → DataSource → SalesTable → Active method-> write the below code

CustConfirmJour _custconfirmjour;

;

select SalesId from _custconfirmjour where _custconfirmjour.SalesId == salesTable.SalesId;

if(_custconfirmjour)

{

buttonUpdatePackingSlip.enable(true);

buttonUpdatePackingSlip.enable(true);

}

else

{

buttonUpdatePackingSlip.enable(false);

buttonUpdatePackingSlip.enable(false);

}

  1. Just validate the SO wether the SO is confirmed or not if not then throw the error and stop the posting process, if so the follow the below steps.

AOT-> Forms ->Salestable → Design → Design->[Group:Table]–>[ButtonGroup:ButtonsHeader]->[MenuButton:ButtonHeaderUpdate]–>MenuItemButton:buttonUpdateInvoice–>Methods–>clicked

CustConfirmJour _custconfirmjour;

;

select SalesId from _custconfirmjour where _custconfirmjour.SalesId == salesTable.SalesId;

if(!_custconfirmjour)

{

throw error(strfmt(“Sales Order not yet confirmed!!”));

}

else

{

super()

}

Regards

Abbas