Project and Portfolio Management Practitioners Forum
cancel

Command to relate existing request

Highlighted
chung925
Contributor.

Command to relate existing request

Hi,

I am trying to relate an existing request to another request and show this relationship in the reference section of a request. Is there a command that can do this? I can only find ksc_copy_request that is related to "request", and that is like creating a request from a template.

Thanks.
3 REPLIES
Torsten Neumann
Trusted Contributor.

Re: Command to relate existing request

At least since 7.5 SP6 there is an undocumented special command ksc_add_request_reference.

Example usage:
ksc_add_request_reference
source_id=30000
source_type=request
target_id=30001
target_type=request
user_id=1
relationship_type=is_related
ksc_end_of_parameters

The following relationship types are supported:
- is_original
- is_duplicate
- is_child
- is_parent
- is_related

Let me know if you need more help.

Cheers from Berlin,
Torsten
Kintana strikes back... ;-)
Sascha Mohr
Acclaimed Contributor.

Re: Command to relate existing request

Hi,
alternatively you can also use an existing PL/SQL function in an execution step, like so:
kcrt_request_util.create_references(
p_source_entity_id => 20
,p_source_id => [REQ.REQUEST_ID]
,p_target_type_code => [REQ.P.TARGET_TYPE_CODE]
,p_target_id => [REQ.P.OBJ]
,p_user_id => [SYS.USER_ID]
,p_ref_relationship_id => [REQ.P.REF_RELATIONSHIP_ID]
,p_parameter_set_context_id => [REQ.P.PARAMETER_SET_CONTEXT_ID]
)
Semenov Alexand
Acclaimed Contributor.

Re: Command to relate existing request

Hi.
I do this by creating execution step in Wf like copy request. In this WF step you can set request type and relationship.
Good Luck