How to provide limited ability to Delete Project Task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2017 06:51 PM
Hi,
I have 1 clarification & 1 need.
Clarification:
- It appears that according to the Task Delete Record ACL and Delete [Global] UI Action, that users who have project_manager role should be able to delete a Project Task from the form, but as I impersonate such a user I do not see the Delete button. Why?
Need:
- I would like to enable a project_user to delete Project Task, as long as they created it and its state is Pending, so I created the following UI Action
- Name=DELETE
- Table=Project Task
- Action=sysver_delete
- Active=true
- ShowUpdate=true
- Client=true
- FormButton=true
- OnClick=confirmAndDeleteFromForm()
- Condition=current.isValidRecord() && current.canDelete() && gs.getUserID() == current.sys_created_by && current.state == 1
- Script=current.deleteRecord();
- RequiresRole=project_user
- Yet, when I impersonate such a user my DELETE button does not show up on the form for a Pending Project Task which I just created. Why?
My questions are:
- Is the solution to my need correct?
- If so, is it related to the clarification, not working as expected?
Any hint would be appreciated; thanks!
Guislain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2017 04:51 PM
Hi Earl,
Thanks Earl, and good tip regarding the "is (dynamic)" option.
Good News:
- Now I can add ACLs, specifically:
Not so good news:
- Delete UI Action button does not appear on task form, regardless of whether I have:
- the it_project_manager role (OOTB expectation),
- or have it_project_user role and this task is assigned to me (custom ACL)
NOTE: The Delete button was (still is) exposed on the Project, but still not on the Project Task.
What else am I missing?
Guislain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2017 08:19 PM
What is the application "Fiscal Calendar" shown in your ACL form view? Are you working in a custom application context? Sorry if I missed it further up in the thread. If so you probably need to either put the ACL in the Global application context or make sure that the Application Access is set to "All Application Scopes" and make sure the "Can delete" checkbox is checked. Take a look at those things and see if they might make a difference.
Earl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2017 08:36 PM
And FYI, I modified the delete ACL (in the Global context) for the pm_project_task table and added the it_project_user and made sure the user "Amelia Caputo" only had the it_project_user role and voila, the delete button shows up on project tasks when I impersonate that user.
This gives me a little more certainty that your application context is the problem.
Earl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2017 12:45 PM
Hi Earl,
Yes, I raised the same question on another thread.
Why are all my changes which require specifying an application (e.g. Dictionary Entry, Access Control, UI Actions) defaulting to "Fiscal Calendar" application, and I cannot scope them at Global level?
I am not trying to build a custom application, and I am just trying to configure existing (mostly PPS) modules.
I believe that it is the root cause to my changes not behaving as expected, with some working with the "Fiscal Calendar" context (e.g. Personalized Forms, UI Controls) but not others (eg: Access Control)?
How do I scope these to be Global?
Guislain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2017 12:50 PM
You choose which application context your in by using the application picker in the header/banner of the SN environment. It's a dropdown list in the header, and if it's not displayed you can click the gear on the far right of the header and go to the "Developer" section of that popup form and turn on the option to show the application picker.
I found out that theFiscal Calendar application is one of the sample custom applications that are provided by ServiceNow as a demo of how to build out a custom app.
Earl