Consuming code unit 414

Is it possible to consume Code Unit 414 (release sales order) using a web service (or is this not allowed) ?

I am using web services in a migration script using c#. The other web services work fine, but I wish to change the status of the sales orders to released in the script.

Do I just need to write a new code unit that calls 414 (or even copy some of 414’s c/al code) ?

Thanks

Dave K.

I just did this in the end…

ReleaseSalesOrder(SalesHeaderNo : Code[20])

SalesHeader.SETFILTER(“No.”, SalesHeaderNo);

IF SalesHeader.FINDSET THEN

CODEUNIT.RUN(414, SalesHeader);