CA Service Management

 View Only

add_change_order 

Dec 09, 2015 05:10 PM

SPEL API methods

add_change_order

 

This method allows to create new change order by using template or from the scratch. It also allows to populate properties if they are defined for the category

 

Definition:

add_change_order( uuid, string, string, int, ... ) ;

uuid - user id

string - id of the change template (optional)

string - created_via persistent_id defines creation interface.

int - number of properties values that will be passed to method (0 - no properties values)

... - if number of properties values >0, values of the properties shall be passed first and then name-value pairs for the attributes to update "atribute1", "value1","atribute2", "value2"

 

working examples"

1. Without properties

uuid who;
send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");
who=msg[0];
send_wait(0, top_object(), "call_attr", "api", "add_change_order", who, "3274", "intfc:3553", 0, "requestor", who, "category","chgcat:6100");
if (msg_error()) {
  logf(ERROR, "get_failed %s",msg[0]);
}
   

2. With properties, but this time without template

uuid who;
send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");
who=msg[0];
send_wait(0, top_object(), "call_attr", "api", "add_change_order", who, "", "intfc:3553", 1, "change property", "requestor", who, "category","chgcat:6100");
if (msg_error()) {
  logf(ERROR, "get_failed %s",msg[0]);
}
   

Statistics
0 Favorited
9 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.