Please enable JavaScript to view this site.

QPR Knowledge Base 2023.1

Navigation: Developer's Guide > QPR API > The Object Model > Common > Actions

AddExternalParent

Scroll Prev Top Next More

Revision history:

Introduced in QPR 7.5.1

Last changed in QPR 8.0 SP1

 

Adds an external element (i.e. not an action) to the parent list of an action.

 

Synopsis:

 

Actions.AddExternalParent(ActionId, Product, ModelId, ObjectId)

 

Parameters:

 

ActionId: Integer. ID of the action for which an external parent is added.

Product: String: PG | SC. Defines the product from which the external parent is added. Note that this cannot be PG when calling this function from the SCApplication.Actions object. However, SC can be used when calling the function from the PGApplication.Actions object.

ModelId: Integer. In the case product is SC or PG, define the desired model ID here.

ObjectId: Integer. In the case product is SC or PG, define the desired model element ID here.

 

Required Rights:

 

Modify rights to the action defined by ActionId.

 

Return Values:

Below are listed the return values that this function can return:

 

RV_SUCCESS

RV_UNKNOWN_ERROR

RV_ASSOCIATION_NOT_FOUND

RV_ACCESS_DENIED

RV_APPLICATION_QUIT_CALLED

RV_NOT_CONNECTED_TO_SERVER

RV_NOT_AUTHENTICATED

RV_UNSUPPORTED_OPERATION

 

Example Procedure:

 

iRet = SCApplication.Actions.AddExternalParent(456456, "SC", iDentorexId, iTopElementId)