suspendStatusCheck

hi there, does anyone know how the function suspendStatusCheck in “Sales Order Line” used? For example, in the post shipment form, if the order is tagged as released and you change the shipping agent code, it asked you if you want to update the shipping agent code in the sales line and if you say yes, it checks that the sales order status is opened. I’m trying to revise the shipping form so that some fields like the shipping agent code and shipment method can be changed in the post shipment form even for released order. Thanks a lot. jane

sure, just delete the suspendStatusCheck form the field. The only boner could be that the validation of the field validates other fields. In this case these field should not generate the release error. However, if you should edit those field (not from a othe field), the system should give the error again. You have to create a new variable and fill it by a new function “SuspendStatusCheckFromValidate”. Or something like that. Set it to yes if you want to suspend the status check when field are validated from field validations. Did I make any sence here?

thanks. i know what you meant here. this is what i need. in the sales order form, when you change the shipping agent and the sales order is already release, it should give the message. in the order shipping form, i should be able to change the shipping agent even if the sales order is already released. Example is when it is a partial shipment and the next shipment is ship through a different carries. The system asks if the detail lines should be updated and if you say yes, then it throws the error. if you say no, it does not but of course the sales lines are not updated. I tried to set the suspendstatuscheck on the onValidate of the shipping form but maybe i’m doing it wrong?

Well let me try to explain with an example. Following code has not been tested, it could be there is a better solution or a other solution is needed. It’s just to explain how you should solve this. This could be the current code in the database: **OnValidate foo** if not SuspendStatusCheck then TESTFIELD(Status,Open); VALIDATE(bar); **OnValidate bar** if not SuspendStatusCheck then TESTFIELD(Status,Open); But you want to suspend the check on field foo if it’s a quote. This would result in: **OnValidate foo** if (not SuspendStatusCheck) AND ("Document Type" <> "Document Type"::Quote) then TESTFIELD(Status,Open); VALIDATE(bar); **OnValidate bar** if not SuspendStatusCheck then TESTFIELD(Status,Open); The system will still generate an error course “foo” validates “bar”. What you should do is introduce a new variable to overwrite this error generation. Something like this: **OnValidate foo** if (CurrFieldNo = FIELDNO(foo)) AND ("Document Type" = "Document Type"::Quote) then SuspendStatusCheckAdv := true; if (not SuspendStatusCheck) OR (not SuspendStatusCheckAdv) then TESTFIELD(Status,Open); VALIDATE(bar); SuspendStatusCheckAdv := false; **OnValidate bar** if (not SuspendStatusCheck) OR (not SuspendStatusCheckAdv) then TESTFIELD(Status,Open); Note that the “IF CurrFieldNo = FIELDNO(foo) THEN” statement will only work if you actuale validate the field foo.