How to make a doctype accesible based on the user selected while saving doctype for ex : Meeting should be accessible to all attendees selected when new meeting is saved.
You can manage this through user permissions,set permissions through Role Permissions Manager .
I know that mam,but for each meeting setting user permission makes the process burden for ex if a meeting has 10 attendees means I need to set user permission for each individual
As per my understanding, you want to give access of created meeting record to those user which are attend the meeting. right?
If yes, then for that you have set Meeting record in each attendees User Permissions
One another solution is that - On the save of meeting you have to make entries in User Permissions of all present users in respective meeting from backend (you have to write code for that) by using frappe.new_doc method.
@priya_s,thanks for the reply, this is the solution I am expecting.
is there any example code using frappe.new_doc then it is much more beneficial to me.
Thanx in Advance
There are a couple ways to do this… You could write a server side script that hooks on
after_save that makes the User Permission entries. Alternatively, you could use a client side script that does a similar thing. Doing it client side is easier as you can do it in a Custom Script customization.
Client side info:
it sucks, that link is broken
I fixed the link