How to set the pending or on hold for sales order

Hi,

My Requirement is i am created a new sales order and In the salesorder header i am adding the status field in that field is having enum and that having parameters are None,Pending and On Hold. Now my requirment is when ever we are manually set the status is pending or On Hold at that time user can not release or post the sales order. How it is possible please guide me

Enable/Disable the posting buttons based on the status…

Hi kranthi please could u tell me the briefly? how we can enable or disable based on status?

void enablePostingButtons()
{
;

buttonUpdatePurchaseOrder.enabled(PurchTable.YOurStatus== YourStatus::None);///add your codition here
}

add this method to the form and call this method in modified method of the newly added status field and active method of the form data source…

Why are you doing this? Pending could be a journal type, on hold you could use the on hold functionality. Depends why you want the functionality.

Hi Kranthi,

actual my requriement is In the Sales Order form–>In the sales line–>Genreal tab i am adding Document Line status field in the design. This document line status field is newly iam adding to SalesLine table.This field is enum type its is contain the parameter as:NONE,ONHOLD,PENDING. Now my requriement is In header -->posting button is disable when ever i am setting the ONhold,pending except None.

above code i am writting in the salesorder form and then i will try to call the modified method but this method will be not came?

If you have two lines - one with status OnHold and other with None, what should happen?

How and where you are calling the method???

If you have two lines - one with status OnHold and other with None, what should happen?

How and where you are calling the method???

i am writting above code in Salestable form–>methods then i will call in the sales table form–>design->groupLine–>tab:tabline-> iam adding filed–>overide method–> modified() method

in this method i am calling but above method not came

if we have two lines-> at that time only post the where will be status: none. and i want staus other than NONE the posting button in The header is disable

Posting button is in header and it is for all lines(not line wise).

Can you explain what you are trying to achieve by doing this?

ok but in the Sales order form->in the Lines i have a 3 lines in that i am cancel the one-line then we can try to post sales order it will post only 2lines

Cancel - Will makes your Delivery Remider to ‘0’.