static void ExportSecurityGroups(Args _args) { SysSecurityUserGroup sysSecurity = SysSecurityUserGroup::construct(); UserGroupInfo userGroupInfo; DomainInfo domainInfo; #file Dialog dialog = new Dialog("@SYS14863"); DialogField dialogFileName; DialogField dialogDomain; Object formdialog; ; dialogFileName = dialog.addField(typeid(FilePath),"@SYS16423"); dialogDomain = dialog.addField(typeid(DomainId), "@SYS89852"); dialog.doInit(); formdialog = dialog.formRun(); formdialog.filenameLookupTitle("@SYS53669"); if (dialog.run() && WinAPI::pathExists(dialogFileName.value()) && (dialogDomain.value() == '' || (select firstonly domainInfo where domainInfo.Id == dialogDomain.value()).recId != 0)) { if (dialogDomain.value() == '') dialogDomain.value('Admin'); while select userGroupInfo { sysSecurity.parmUserGroupId(userGroupInfo.id); sysSecurity.parmDomainId(dialogDomain.value()); sysSecurity.load(); sysSecurity.export(dialogFileName.value() + @'\' + dialogDomain.value() + '_' + userGroupInfo.id + '.asg'); } } else warning("No action taken..."); info("Done"); }
This technical blog will be about my adventures with Microsoft Dynamics 365 for Operations (AX7/D3fo), AX 2012, and AX 2009.
Tuesday, March 27, 2012
Job to export all AX 2009 security groups to files
I have been changing security a bunch lately and it's nice to have a backup of your previous settings if you make a mistake. Here is a quick job I wrote to export your existing security settings to a folder.
Subscribe to:
Post Comments (Atom)
Nice tool, but there is something missing: the Domain. When I tried running it, all of the groups contained empty information. Before the dialog setup (the first line of runnable code), I added:
ReplyDeletesysSecurity.parmDomainId([DomainId]);
Now everything exports properly. For implementations with multiple domains, you may want to go a little bit further and add a dropdown box to select which domain to export from.
Great comment. The environment I was working in didn't use Domains so I spaced them. I've updated the job to work with domains.
DeleteI am thankful to you for sharing this plethora of useful information. I found this resource utmost beneficial for me. Thanks a lot for hard work. Melbourne Integriti
ReplyDeleteGoing to graduate school was a positive decision for me. I enjoyed the coursework, the presentations, the fellow students, and the professors. And since my company reimbursed 100% of the tuition, the only cost that I had to pay on my own was for books and supplies. Otherwise, I received a free master’s degree. All that I had to invest was my time. security guards
ReplyDeleteI got this blog site through my friends and when Home Security Companies I searched this really there were informative articles at the place.
ReplyDeleteI haven't yet met an unsuccessful job seeker who was in some way lacking in self-confidence. It is one of the reasons that I decided to in part cross the divide and become a CV Writer, because universally in most job searches the CV is a common point. Job consultancy
ReplyDeleteMost job boards do not allow for listing of emails, URL's, use of copyrighted material, defamatory remarks, false, inaccurate or misleading information, illegal or unethical content. Job postings that encourage job seekers to email for more details, are usually prohibited.How to Make cover letter
ReplyDeleteWith a chronological resume, ashamed of being unemployed it requires someone to look at each job and try to ascertain or guess what skills a person has and in a competitive job market that type of extensive review may not be conducted.
ReplyDeleteWell, it’s a nice one, I have been looking for. Thanks for sharing such informative stuff.
ReplyDeleteContinued
Thank you so much for sharing this great blog.Very inspiring and helpful too.Hope you continue to share more of your ideas.I will definitely love to read. https://paradiseeventproductions.com/surveillance-cameras-and-home-security/
ReplyDelete