Tuesday, April 11, 2023

Set vendor on hold using x++

 Set vendor on hold using x++.

While inserting the vendor If the vendApproval is yes. I need to hold that vendor. I have used the below code.

[ExtensionOf(tableStr(VendTable))]
internal final class Vendtable_Extension
{
    public void insert()
    {
        next insert();
		
        container con;

        con = conIns(con,1,this);

        if(this.VendorApproval == NoYes::Yes)
        {
            VendTable::updateOnHold(con,
				    CustVendorBlocked::All,
				    dateNull(),
				    false,
				    true,
				    " New Record ");
        }
        
    }
}


Keep Daxing!!

No comments:

Post a Comment