How to Duplicate a Role with Permissions in ERPNEXT

Hi everyone,

Could someone assist me with this?

Is there a way to create a custom role duplicating an existing role and its associated permissions?

In my case, I’m trying to duplicate the “Sales Manager” role, but the “Duplicate” option only copies the role data and not the associated permissions.

Go to the Custom DocPerm (to do this, open the doctype and search for Custom DocPerm, then open it). Export the Sales Manager role, update the new name, and import it. After that, check if it works.

You can’t simply duplicate the role because it’s set at the doctype level, and sometimes it’s not stored in Custom DocPerm. So, make sure to check it from your side.

Thanks, @NCP for your valuable input it’s working. Is the same way for import Role Permission for Page and Report

To clarify @NCP 's reply,

  1. Go to New Data Import, Select ‘Custom DocPerm’ as the document type, and Import type ‘Insert New Records’, and Save.
  2. Download template and filter out for desired role whose permissions you wish to duplicate.
  3. Create the new Role in ERPnext
  4. Replace the Role name in the template with the newly created name.
  5. Import.
1 Like

:raised_hands:

1 Like

thanks for update @federico_calvo :+1: