Unable to Open & lock Service Contract Header :
ServiceContract contract = new ServiceContract();
contract = css.Read("SK-99999");
contract.Change_Status = Change_Status.Open;
css.Update(ref contract);
contract = css.Read("SK-99999");
contract.Change_Status = Change_Status.Locked;
error -> css.Update(ref contract);
Errors with : Change Status must be equal to 'Open' in Service Contract Header: Contract Type=Contract, Contract No.=SK-99999. Current value is 'Locked'.
Anyone with a solution to this
regards
Bjørn
0
Answers
ServiceContract contract = new ServiceContract();
contract = css.Read("SK-99999");
contract.Change_Status = Change_Status.Open;
css.Update(ref contract);
... modify .... contract lines
... more logic
//Lock contract in order to do invoicing ....
//FAILS
contract = css.Read("SK-99999");
contract.Change_Status = Change_Status.Locked;
css.Update(ref contract);
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!