Hi McRonald, i've done something similar to your needs . You can loop through the role you want to copy, looping through his privileges , duties and permissions. You can do that using TreeNode and TreeNodeIterator ( there is some code on the net ) and by getting helped by #AOT and #Properties macros that contain the info that you need. 1. Get the Security role node 2. loop through his child nodes while adding the node info into your new privilege like that: find duty -> go to duty and loop privileges -> go to privilege and loop entrypoints -> create entry point with same properties in the new privilege that you have created same goes for privileges and for permissions (table/Forms/server methods) Remember after job execution to save the aot new security nodes. The rest is up to your coding skill. Hope this helps,
↧