Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Disable the option to MAKE a COPY

Highlighted
telefonicaecu
Acclaimed Contributor

Disable the option to MAKE a COPY

Hi Community,

 

Please, I need your help about PPM 

 

I need to know if you can disable the option to MAKE a COPY when you want to copy a form

Or to disable the options: Copy Request Notes and Copy Request References, in this case

 

 

Thanks a lot

Danny

 

 

P.S. This post has been split off from other thread, moved to Project and Portfolio Management Support, and edited its subject. - Hp Forum Moderator

3 REPLIES
Utkarsh_Mishra
Honored Contributor

Re: Disable the option to MAKE a COPY

You can easily disbale the COPY button from all or specific Request types 

 

There are 2 way.

 

1. Use UI rule to disable the button (and call it on page load)

 

2. Add below SQL statement (highligthed in RED) in KCRT_PARTICIPANT_CHECK.can_user_copy_request

SELECT rt.request_type_id
INTO l_request_type_id
FROM kcrt_requests req,
kcrt_request_types rt,
kcrt_request_type_create_v krtc
WHERE req.request_id = p_request_id
AND req.request_type_id = rt.request_type_id
AND rt.enabled_flag = 'Y'
AND rt.request_type_id = krtc.request_type_id
AND   krtc.user_id = p_user_id
/* Add this below line*/
AND krtc.user_id = 1

 

This will make only ADMIN user to view copy request button.

 

Now if you want to only disbaled the option for specify request type then modify KCRT_PARTICIPANT_CHECK.can_user_copy_request accrodingly.

 

Regarding your query disable the options: Copy Request Notes and Copy Request References this can only be achive by modifying the JSP CopyRequest.jsp

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
sb12dec
Occasional Contributor

Re: Disable the option to MAKE a COPY

Hi Utkarsh,

 

Both option is not working for me.. :(

 

1) The reason may be because UI rules does not works for closed request.

2)I tried to update the KCRT_PARTICIPANT_CHECK.can_user_copy_request by modifying the query as shown below:-

                    SELECT rt.request_type_id
                    INTO l_request_type_id
                    FROM kcrt_requests req,
                    kcrt_request_types rt,
                    kcrt_request_type_create_v krtc
                   WHERE req.request_id = p_request_id
                     AND req.request_type_id = rt.request_type_id
                  AND rt.enabled_flag = 'Y'
                  AND rt.request_type_id = krtc.request_type_id
                  AND krtc.user_id = p_user_id

                  AND krtc.request_type_id not in '31027';-----------------added this extra line on teh function

 

But it didn't worked for me.

Am I missing some thing on this? Please suggest

 

Thanks

Utkarsh_Mishra
Honored Contributor

Re: Disable the option to MAKE a COPY

Execute this function with proper request type ID and check if any rows are returned. You need to tweek this query to work according to your requirement.

 

I would suggest just add (ONLY) AND krtc.user_id = 1 and check if this is disabling the copy for all users, except admin, Later you can modify to work accroding to ur req.

 

I would suggest to try it first on non-production environement. Post SQL update, do a clean restart of PPM by removing tmp and work directory from all your nodes. Also clear cahce of your broswer.

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
//Add this to "OnDomLoad" event