Is there a way to list security rights for all users across all companies
(without running the user permissions report for each combination)? I am
trying to achieve this with a job, but I dont want the prompt to appear for
each case, so I'm doing the following:
static void AllUserSecurityReport(Args _args)
{
SysUserSecurityReport sysUserSecurityReport;
SysUserInfo userInfo;
PrintJobSettings printSettings = new PrintJobSettings();
SysSecurity sysSecurity;
DataArea dataArea;
;
//Set up our print settings (print the data to the print archive)
printSettings.setTarget(PrintMedium::PrintArchive);
printSettings.preferredTarget(PrintMedium::PrintArchive);
printSettings.format(PrintFormat::PDF);
printSettings.preferredFileFormat(PrintFormat::PDF);
//Run through all users
while select userInfo
{
while select dataArea
{
sysUserSecurityReport = new SysUserSecurityReport();
sysUserSecurityReport.getLast();
sysUserSecurityReport.initParmDefault();
sysUserSecurityReport.parmUserId(userInfo.Id);
sysUserSecurityReport.parmDataAreaId(dataArea.id);
sysUserSecurityReport.init();
//if(sysUserSecurityReport.prompt())
{
sysUserSecurityReport.initPrinterSettings(printSettings);
sysUserSecurityReport.run();
}
}
}
}
This reports the following exception:
Error executing code: RunBaseDialogModify object not initialised.
Stack trace:
(C) \Classes\RunBaseDialogModify\initPrinterSettings
(C) \Classes\RunBaseReport\initPrinterSettings - line 3
(C) \Jobs\AllUserSecurityReport - line 35
If I omit the call to initPrinterSettings, the exception just gets thrown in
sysUserSecurityReport.run. Am I going about this totally wrong, and is there
already a way to do this?
Regards,
Matt Benic
Axapta Developer
UTi Sun Couriers Division
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

