QPR Installation Instructions



Previous topic Next topic  


Previous topic Next topic JavaScript is required for the print function  

Revision history:

Introduced in QPR 8.1


Set a single attribute value to one or more objects defined in the objectIds parameter.




void SetAttribute(string sessionId, string objectIds, string attribute, string value, string options)


Return Value:






sessionId: String. ID of an authenticated session.

objectIds: String. A comma-separated list of FullID's of objects to which the attribute value should be added.

attribute: String. Name of the attribute to be set.

value: String. Value of the attribute to be set. Note that all values must be provided as XML-compatible string values.

options: String. A comma-separated list of options for the command. Note that there can be also mandatory options specific to product and object type.


Example Procedure:


ServiceClient client = new ServiceClient("WSHttpBinding_IService");

string sessionId = client.Authenticate("qpr", "demo");

string[][] attributes = { new string[] { "Description", "Hello from QPR Web Services Foundation" }, new string[] { "Category", "Initiative" } };

string objectId = client.CreateObject(sessionId, "PO", "actionplan", "Action Plan created via WS API", "", attributes, "");

MessageBox.Show("Created object with ID " + objectId);

// add more attributes to the object

client.SetAttribute(sessionId, objectId, "status", "Waiting for approval", "");