Pages

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.



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");
}

76 comments:

  1. 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:
    sysSecurity.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.

    ReplyDelete
    Replies
    1. 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.

      Delete
  2. I 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

    ReplyDelete
  3. I got this blog site through my friends and when Home Security Companies I searched this really there were informative articles at the place.

    ReplyDelete
  4. I 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

    ReplyDelete
  5. Most 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

    ReplyDelete
  6. With 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.

    ReplyDelete
  7. Well, it’s a nice one, I have been looking for. Thanks for sharing such informative stuff.
    Continued

    ReplyDelete
  8. 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
  9. I have read your article, it is very informative and helpful for me.I admire the valuable information you offer in your articles. Thanks for posting it.. visit this page

    ReplyDelete
  10. As a seller of legal steroids, you can buy Crazy Bulk products, explore stacks and finally get the body you’ve always wanted good morning messages

    ReplyDelete
  11. I went over this web site and I think you have a lot of great information, saved to fav (:. Unique Dofollow Backlinks

    ReplyDelete
  12. Wow! Such an amazing and helpful post this is. I really really love it. It's so good and so awesome. I am just amazed. I hope that you continue to do your work like this in the future also https://securitysingapo.livejournal.com/281.html

    ReplyDelete
  13. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! security guard company in Singapore

    ReplyDelete
  14. All the contents you mentioned in post is too good and can be very useful. I will keep it in mind, thanks for sharing the information keep updating, looking forward for more posts.Thanks security guard agency

    ReplyDelete
  15. Others need to know job area. Most job sheets guarantee that an elegantly composed job posting can accomplish a lot more qualified applications than an ineffectively composed job posting. földmunkagép szállítás Europa-Road Kft.

    ReplyDelete
  16. If you set out to make me think today; mission accomplished! I really like your writing style and how you express your ideas. Thank you. security company

    ReplyDelete
  17. I am glad you take pride in what you write. This makes you stand way out from many other writers that push poorly written content. https://medium.com/@mitia.dera/security-services-in-cambodia-464074ed3779

    ReplyDelete
  18. Great Information sharing .. I am very happy to read this article .. thanks for giving us go through info.Fantastic nice. I appreciate this post. https://penzu.com/p/3d933e4d

    ReplyDelete
  19. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. https://www.tumblr.com/blog/princesecurityservice1212

    ReplyDelete
  20. This is such a great resource that you are providing and you give it away for free. security services

    ReplyDelete
  21. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. uniform security guard

    ReplyDelete
  22. Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. get best security services

    ReplyDelete
  23. i never know the use of adobe shadow until i saw this post. thank you for this! this is very helpful. best security company in cambodia

    ReplyDelete
  24. Great post, and great website. Thanks for the information! security company sihanoukville

    ReplyDelete
  25. The content is utmost interesting! I have completely enjoyed reading your points and have come to the conclusion that you are right about many of them. You are great, and your efforts are outstanding! cambodia security company

    ReplyDelete
  26. Love to read it,Waiting For More new Update and I Already Read your Recent Post its Great Thanks. security service company in cambodia

    ReplyDelete
  27. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. https://penzu.com/p/0099f68f

    ReplyDelete
  28. Awesome article, it was exceptionally helpful! I simply began in this and I'm becoming more acquainted with it better! Cheers, keep doing awesome! best security guard sihanoukville

    ReplyDelete
  29. I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article... http://783310.website2.me/

    ReplyDelete
  30. I haven’t any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us. https://school-security-guards-site.yolasite.com/

    ReplyDelete
  31. This comment has been removed by the author.

    ReplyDelete
  32. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. security company in cambodia

    ReplyDelete
  33. Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. https://bestsecurityguardherenow.wordpress.com/

    ReplyDelete
  34. This comment has been removed by the author.

    ReplyDelete
  35. Interesting, but not ideal. Are you going to write more? press ctrl

    ReplyDelete
  36. Some excellent secrets that can be learnt from the post. I have now come to understand that that a person can really be successful on this issue and acquire additional skills and qualities by reading a weblog like yours. Thank you for the interesting tips you’ve shared here. casinoholic

    ReplyDelete
  37. I will proper now take maintain of your rss as I can’t to find out your electronic mail subscription hyperlink or e-e-publication carrier. Do you've got got any? Kindly permit me understand truely so I may additionally furthermore honestly subscribe. Thanks.

    ReplyDelete
  38. Took me time to examine all the comments, but I really loved the object. It proved to be very useful to me and I am sure to all the commenters here! It is continually good when you may’t solely learn, however similarly engaged! I’m sure you had pride writing this newsletter. Anyway, in my language, there aren’t lots appropriate supply like this.

    ReplyDelete
  39. Congratulations on having one of the maximum sophisticated blogs Ive come upon in a while! Its just top notch how tons you could do away with from something certainly due to how visually lovely it is. Youve prepare a brilliant blog space –high-quality portraits, movies, format. This is clearly a have to-see blog!

    ReplyDelete
  40. I’d ought to confirm with you right here. Which isn't some thing I typically do! I enjoy reading a post that can make parents think. Additionally, thanks for allowing me to remark!

    ReplyDelete
  41. Bear in mind that crypto arbitrage , while possibly lucrative, is not without risks. Be prepared for sudden industry shifts.

    ReplyDelete
  42. Great post buddy! Enjoyed studying, is there a subscribe button so I Can subscribe and get notified of recent posts?

    ReplyDelete
  43. performing arts is my aspect, i am very a great deal involved to investigate more on this art“

    ReplyDelete
  44. And if it’s just a warfare movie then why they show me aliens taking pictures at now not anything? They crammed this movie with movement sequences which make no sense (aleatory capturing, ridiculous escapes from impossible situations and similarly).

    ReplyDelete
  45. It’s a outstanding pity you simply don’t revel in a donate switch! I’d most likely donate to this wonderful weblog! Document assume that right now i’ll accept e-book-marking and furthermore attaching any Rss feed to make sure you outstanding Google and bing membership. Document take a look at forth to make certain you new posts all of which display this technique website online by way of the use of first rate Youtube group: )

    ReplyDelete
  46. Presently the grade of our very personal bordering is now a essential scenario. The complete community human populace will be developing consequently all of sudden the planet is now also congested.

    ReplyDelete
  47. I am glad that I found this internet web page online, exactly the right information that I become searching out!

    ReplyDelete
  48. Major thanks for the article. Will read on... DA50+ Backlinks

    ReplyDelete
  49. Consider applying trading bots with tailor-made parameters that permit you to modify your trading technique as industry conditions evolve.

    ReplyDelete
  50. Im impressed, I have to say. Extraordinarily hardly ever do I found a weblog thats each educative and pleasing, and allow me let you know, youve hit the nail on the

    ReplyDelete
  51. Major thanks for the blog article.Really thank you! Will read on... Boost Your Website Ranking

    ReplyDelete
  52. Hiya very cool internet site!! Guy .. Beautiful .. Wonderful .. I’ll bookmark your weblog and take the feeds additionally…I am glad to seek out such a lot of beneficial facts proper right here inside the post, we want work out extra strategies on this regard, thank you for sharing.

    ReplyDelete
  53. Hi there! This is my first visit to your weblog! We are a set of volunteers and beginning a new undertaking in a community within the identical vicinity of hobby. Your blog supplied us beneficial facts to art work on. You have done a extraordinary job!

    ReplyDelete
  54. If I must say some thing, then not whatever will stop the chatter inside

    ReplyDelete
  55. Evaluate the scalability of your arbitrage strategy. As your trading size develops, you may need to regulate your method to take care of larger trades and more complex operations.

    ReplyDelete
  56. Pondering accurate enjoy humiliated to wait any kind of ceremony despite the fact that you are dangerous weight .? If you are really engaged together together with your non-public belly’s more weight? Need to have interaction is yes, following that take the primary smart merchandise regularly referred to as like Honed Medspa with which attainable clear up due to the sickness to do with obese. However, there are a variety of devices thatrrrs to be had, this declare they are able to lessen your fats cells in a special professional duration most of them aren't powerful.

    ReplyDelete
  57. Great day,your blog is full of spam, you should should antispam software. top up game

    ReplyDelete
  58. i have a very busy life-style too, and i would constantly often devour on Fastfoods“

    ReplyDelete
  59. I like this post a lot. i’ll undoubtedly be back. Hope that i’ll be able to read a lot of insightful posts then. are sharing your data with all of my friends! to4d login

    ReplyDelete
  60. Intriguing article. I apprehend I’m a bit late in posting my comment even though the item become to the factor and the information I became trying to find. I can’t say that we remember the entirety you can noted however it changed into emphatically fascinating! BTW…I discovered your net internet page thru a Google searching for. I’m a commonplace traveler in your weblog all of so that it will move back yet again quick.

    ReplyDelete
  61. We maintain listening in the direction of facts communicate close to getting fee-loose at the net supply skills so I are simply looking for near for that absolute exceptional how does a person accumulate one.

    ReplyDelete
  62. I’d should are attempting to find advice from you here. Which isn’t some thing I do! I want to studying an article on the way to get humans to agree with. Also, thank you allowing me to remark!

    ReplyDelete
  63. After take a look at a number of the websites to your internet website now, and I in truth like your manner of running a blog. I bookmarked it to my bookmark internet website online list and will also be checking lower decrease again fast. Pls take a look at my internet net site on line on the equal time and allow me understand the manner you sense.

    ReplyDelete
  64. Wow! Thank you! I constantly favored to jot down on my net website some issue like that. Can I take a fraction of your placed as much as my internet net page?

    ReplyDelete
  65. I even have to say which i barely disagree, but no biggie.

    ReplyDelete
  66. It is the exquisite time to make some plans for the destiny and it’s time to be satisfied. I actually have analyze this put up and if I might also in reality I choice to indicate you few thrilling subjects or hints. Perhaps you can write subsequent articles concerning this newsletter. I need to investigate greater subjects about it!

    ReplyDelete
  67. After study numerous of the web sites to your net net website online now, i simply as though your technique of running a blog. I bookmarked it to my bookmark internet net website online listing and is probably checking once more soon. Pls have a have a look at my internet website on line too and tell me what you observed.

    ReplyDelete
  68. Thank you for every different wonderful article. The area else can also furthermore every body get that form of data in this kind of splendid manner of writing? I truely have a presentation next week, and I’m on the search for such info.

    ReplyDelete
  69. I simply love to read new topics from you weblog.,*-’-

    ReplyDelete
  70. Cheers, a really interesting read – added to bookmarks so will pop back for new content and to read other people’s comments. Thanks again.

    ReplyDelete
  71. The the following time I just examine a weblog, I hope that this doesnt disappoint me as much as this area. What i’m announcing is, It become my technique to study, however I truely notion youd have something exciting to mention. All I pay attention is usually a bunch of whining approximately something that you can restoration have to you werent too busy looking for attention.

    ReplyDelete
  72. Purchasing YouTube subscribers stands as a strategic move for those aiming to elevate their channel's presence on one of the world's largest video platforms. This initiative can considerably amplify a channel's visibility, creating an appealing perception of popularity that naturally attracts more viewers. With a greater subscriber count, channels appear more credible and trustworthy, making it easier to foster a dynamic community of engaged followers. This approach strategically positions channels to leverage YouTube's algorithm, promoting their content to a wider audience, thereby boosting organic growth. It also serves as a stepping stone for content creators, enabling them to focus on crafting high-quality, engaging content with a solid viewer base already in place. For new and emerging channels, buying subscribers can provide the crucial initial momentum needed to break through the clutter and make a significant impact in a competitive digital space.
    https://www.buyyoutubesubscribers.in/

    ReplyDelete
  73. Rattling clean site, thankyou for this post. slot demo

    ReplyDelete