- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2015 03:44 AM
Hi,
I have been thinking how to let users with project_user role to have write acl on the table pm_project_task ONLY if he is the project_manager (field) of the parent project (pm_project).
I grant write to the role with a condition where (dot walking) .u_ref_proj.project_manager is (dynamic) me, but then all project tasks fields become Read Only.
u_ref_proj is a project task field which references to project table.
I have been trying to add the following script (suggested by other in the community) instead of the control but nothing changes:
It is weird because I applied the same script for omitting the New button (thanks to Anurag) from the list and it worked (changing the true/false for the answer)...
var utente=gs.getUserID();
if (parent.project_manager==utente) //since we have a relationship/related list between the two tables
answer=true;
else
answer=false;
I would appreciate any comment!
Thanks,
Skender
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2015 01:00 AM
just write the code that when a new task is added , the project number is filled in u_ref_proj.
And on the projet form use the "-> parent" related list.
This will fix all your troubles.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2015 05:31 AM
I think there is a conflict:
I see two related lists under project form.
- pm_project_task.parent
- pm_project_task.u_ref_proj
The second is the u_ref_proj which refers to the pm_project table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2015 05:36 AM
Maybe the real problem is:
how to pass (a kind of relation so I can retrieve parent's field from dot walking...) from the fields of pm_project_task to the fields of pm_project?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2015 08:59 AM
There will not be a conflict. this is actually one of the ways to relate 2 tables in service now (creation of reference fields).
Since you created a custom field u_ref_proj so a new related list is also available for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2015 09:02 AM
Ok I get it, but where do I create project tasks? In which related list?
I do not want to make damage to the system...
Thanks,
Skender