Example: Work log creation by using MBO APIs

The scripting framework does not have any functions to create a work log. You must use the documented MBO APIs to create the work log.

Many API invocations are used to create the work log. Because the script is running against the service request (SR) object, the scripting framework offers a handle to the service request object. The mbo keyword in the body of the script is used to retrieve the handle. Other related business objects can be accessed from the handle.

The data in the initialized business object is saved. You do not have to invoke a save method on the business object from within the script. The work log is now created if the volume of the pipeline is greater than 1000 cubic feet.



Feedback