Hi,
Please guide me,how can i update payroll tax data version 2020 in Microsoft dynamic AX2012.
Hi,
Please guide me,how can i update payroll tax data version 2020 in Microsoft dynamic AX2012.
Dears,
Hope all are well and safe.
Could you please advise if there is way to re-schedule the loans in the Payroll module of AX2012 R3 without the need of modifying each date by itself?
Imagine having to re-schedule a loan with 50 installments (or even more) by modifying each line's date.
Best regards,
Georgio Maalouf
Hi All,
After Sales Invoice posting ( batch / manual) I want to post the related intercompany purchase invoice and pass some infomation from SalesInvc to PurchaseInvoice... Looking for suggestion as to where to write the logic and some code snippet.
Thanks in advance
Hi everyone,
In the past Microsoft has released updated 1099s. I am not seeing anything in LCS for the changes in 2020 regarding the new 1099-NEC for 2012R3. Will MS be releasing something on this or am I missing something?
Thank all
Hi Experts
I have a custom form , currently a user can open as many instance as he wants by clicking on the menu item.
I want to restrict this in a way that user at any given point can open only 1 instance of the form, please share how do i achieve this.
Thanks
Mav
Hi Experts,
I want to show values of info parts on list page how and is it possible??
Best Regards,
Shabir Ahmad
I have a problem generating a report. Warehouse: SUR_C. For example, today the report from the beginning of the month to today has been set up. It gets around 4h-6h. Before, it was 1.5h-3h. And it always took a dozen or so minutes. We always make such a report at the end of the month, i.e. for example, we made a report for the entire October 2020.
Once there was a situation where on one of the computers the same report was generated for 1.5 hours and on mine it was 3 hours. Why is it taking so long? Do you have any ideas for a solution to make the report run shorter?
static void Mzk_ExportUsersecurities_User123(Args _args)
{
SysExcelApplication xlsApplication;
SysExcelWorkBooks xlsWorkBookCollection;
SysExcelWorkBook xlsWorkBook;
SysExcelWorkSheets xlsWorkSheetCollection;
SysExcelWorkSheet xlsWorkSheet;
SysExcelRange xlsRange;
CustTable custTable;
int row = 1;
str fileName;
SecurityTask securityTask, securityTaskDuty, securityTaskPriv;
SecuritySubTask securitySubTask;
SecurityRoleTaskGrant securityRoleTaskGrant;
SecurityRole securityRole, securityRoleDuty,securityRolePriv, securityRoleM;
SecurityTaskEntryPoint SecurityTaskEntryPoint;
SecurableObject SecurableObject;
SecurityUserRole securityUserRole;
UserInfo userInfo;
SecurityTaskEntryPoint taskEntryPoint;
SecurityRole role;
SecurityRoleTaskGrant taskGrant;
SecuritySubTask subTask;
SecurityTask privilege;
str privName;
str dutyName;
str entrName;
str accessLevel;
boolean i = true,j = true;
;
fileName = "C:\\Temp\\AXrole.csv"; //Rename file
xlsApplication = SysExcelApplication::construct();
xlsWorkBookCollection = xlsApplication.workbooks();
xlsWorkBook = xlsWorkBookCollection.add();
xlsWorkSheetCollection = xlsWorkBook.worksheets();
xlsWorkSheet = xlsWorkSheetCollection.itemFromNum(1);
xlsWorkSheet.cells().item(row,1).value("User Id");
xlsWorkSheet.cells().item(row,2).value("User Role");
xlsWorkSheet.cells().item(row,3).value("Duty");
xlsWorkSheet.cells().item(row,4).value("Privilege AOT");
xlsWorkSheet.cells().item(row,5).value("Privilege Description");
xlsWorkSheet.cells().item(row,6).value("Entry Point");
xlsWorkSheet.cells().item(row,7).value("Permission");
row++;
while select * from securityRole
join securityUserRole
where securityUserRole.User like "USERNAME" //Enter user information here
&& securityUserRole.SecurityRole == securityRole.RecId
{
while select * from securityRoleTaskGrant
join * from securityTask
where securityRoleTaskGrant.SecurityRole == securityRole.RecId
&& securityTask.RecId == securityRoleTaskGrant.SecurityTask
{
if(securityTask.Type == SecurityTaskType::Duty)
{
while select SecurityTaskEntryPoint
join SecurableObject where SecurableObject.RecId == SecurityTaskEntryPoint.EntryPoint
join subTask where subTask.SecuritySubTask == SecurityTaskEntryPoint.SecurityTask
join taskGrant where taskGrant.SecurityTask == subTask.SecurityTask
join role where role.RecId == taskGrant.SecurityRole
&& role.AotName like securityRole.AotName
{
select privilege
where privilege.RecId == taskGrant.SecurityTask
&& SecurityTaskType::Duty == privilege.Type;
dutyName = privilege.AotName;
select privilege
where privilege.RecId == subTask.SecuritySubTask
&& SecurityTaskType::Privilege == privilege.Type;
privName = privilege.AotName;
{
//Information to Excel
xlsWorkSheet.cells().item(row,1).value(securityUserRole.User); //User id
xlsWorkSheet.cells().item(row,2).value(securityRole.Name); //Role Name
xlsWorkSheet.cells().item(row,3).value(dutyName); //DutyName
xlsWorkSheet.cells().item(row,4).value(privName); //Privilege AOT Name
xlsWorkSheet.cells().item(row,5).value(privilege.Name); //Privilege Description
xlsWorkSheet.cells().item(row,6).value(SecurableObject.Name); //Entry Points
xlsWorkSheet.cells().item(row,7).value(enum2str(SecurityTaskEntryPoint.PermissionGroup)); //Access Permission level
row++;
}
}
}
else //Role if contain Privilegs directly
{
while select * from SecurityTaskEntryPoint
join SecurableObject
where SecurableObject.RecId == SecurityTaskEntryPoint.EntryPoint
&& SecurityTaskEntryPoint.SecurityTask == securityTask.RecId
{
xlsWorkSheet.cells().item(row,1).value(securityUserRole.User); //User id
xlsWorkSheet.cells().item(row,2).value(securityRole.Name); //Role Name
xlsWorkSheet.cells().item(row,3).value(""); //DutyName
xlsWorkSheet.cells().item(row,4).value(securityTask.AotName); //Privilege AOT Name
xlsWorkSheet.cells().item(row,5).value(securityTask.Name); //Privilege Description
xlsWorkSheet.cells().item(row,6).value(SecurableObject.Name); //Entry Points
xlsWorkSheet.cells().item(row,7).value(enum2str(SecurityTaskEntryPoint.PermissionGroup)); //Access Permission level
row++;
}
}
}
}
if(WinApi::fileExists(fileName))
WinApi::deleteFile(fileName);
xlsWorkbook.saveAs(fileName);
xlsApplication.visible(true);
info(strFmt("File has been exported"));
}
Hi Experts,
After adding this logic i get only Header not rolese and Privileges as shown in exported excel sheet image. Note I used this code before but it was working right now not..
Best Regards,
Shabir Ahmad
Good Day!
Please help me to find this error message from PurchEditLines form.
Where I can find this error message?
I tried to find this on InventOnhandQty and InventOnhand Classes, but still I cannot find it.
The reason why I trying to find this error message is to override it and put there my own validation code.
Thank you in advance
Greetings everyone,
In Human resources > Positions > Positions, there's a tab called "Payroll" that has the field "Schedule" for every position. When I right click on the field to go to form info, it says it's a field called "Schedule" inside PayrollPositionDetails. However, when I open the table in Visual Studio, the field is nowhere to be found.
Does anyone know what is the problem exactly?
I am very new to Trade Agreements in AX and I am working my way through it. Is there a way to get a list of all the active sales trade agreements for a specific Vendor?
Thanks!
Hi All,
In the PO, I need to roll the sales tax into the purchase cost (debit inventory or debit purchase expense), on the credit side, I need it to hit AP. Just AP only, no Sales Tax Payable. If it hits the Sales Tax Payable account, it would be fine, too, but it needs to back out of the same account. Meaning, sales tax payable in & out = zero. When I run the tax report at the end of the month or quarterly or whenever needed, I'm able to generate the sales tax payable report. Is there such an option or workaround? Thanks so much for your feedback.
To roll the sales tax into purchase cost, I have the charge code as seen below.
Hi Experts,
For the first time i watch a Property Changed by -AOS- instead of any userID Created by and changed by -AOS- what does that mean as shown in the above image.
Best Regards,
Shabir Ahmad
coIn budgetntrol statistic, what does it mean if the budget for encumbrance is negative?
Hello DAX people,
When I create a new line in a timesheet from the enterprise portal, sometimes the line is deleted for some users. I tried to reproduce this scenario in our test environment but I couldn't, the line is always created OK. Yet some users are having this random problem. Any suggestions, please?
Hello!
Please, advice where I can set Item Model Group for an Item? It seems there is no such field in the product release form?
Thanks in advance!
hi all,
customer aging report parameters are missing in AX 2012 R3..any idea?
this is vendor aging report..like this in customer aging parameters are not showing
Hi,
I want to find the hsn code for line record for a transfer order.
I can't find any relation between the tables inventtransferline and hsncodetable_in. I even tried searching for inventjournalline and didn't find any.
I tried the code
Hsncodetable = hsncodetable_in::find(inventtransferline.HSNCodeTable_In)
But it is not getting hit and in SQL inventtransferline.HSNCodeTable_In does not exist
Hello All,
i have create the custom role for a user to print Customer invoice journal but im unable to find the suitable . Please let me know which privilege to be include in it .
Hi,
I have a code issue that are troubling me and I would like to see if any of you have an idea.
Currently we’re integrating to a new website.
One of the functions we need is to generate an invoice to the customer.
We’ve added a button on the website, once pushed it will send through an email and invoice number to a method in AX that will generate the invoice and email it back.
The headache comes as it works for some invoices but not others and I cannot seem to figure out why.
The error we get is that when sending the email there is no file to attach.
So somewhere when I’m generating the invoice in AX it doesn’t work and then when I call the send email code there is no file to attach.
When I preview the invoices in AX they all shows to screen with no issues.
I can also save them as PDF’s no issue.
But when running the code some invoice fails to save other work fine, the is error:
Method 'addAttachment' in COM object of class 'CDO.Message' returned error code 0x80070002 (<unknown>) which means: The system cannot find the file specified.
I haven’t been able to google anything useful regarding this error.
I have a job I’m using to call the method
staticvoid SSS_EmailInvoice(Args _args)
{
//str xmlDoc = "<InvoicePrint><FromAddress>sales@sssaustralia.com.au</FromAddress><ToAddress>soren.rasmussen@sssaustralia.com.au</ToAddress><Subject>SSS Invoice</Subject><Body>This is your invoice</Body><InvoiceId>SI0483794</InvoiceId><SalesId></SalesId> </InvoicePrint>"; //works
str xmlDoc = "<InvoicePrint><FromAddress>sales@sssaustralia.com.au</FromAddress><ToAddress>soren.rasmussen@sssaustralia.com.au</ToAddress><Subject>SSS Invoice</Subject><Body>This is your invoice</Body><InvoiceId>SI0486086</InvoiceId><SalesId></SalesId> </InvoicePrint>"; //fails
//SI0497671,SI0483794,SI0483794,SI0486086,SI0497599,SI0497600
CV_SSSCustom::printInvoice(xmlDoc);
}
The method is a static method on a functions class
publicstaticstr printInvoice(str xmlPayload)
{
XmlDocument doc;
XmlElement element;
XmlElement item;
XMLNodeListIterator iterator;
//
SysEmailParameters parameters = SysEmailParameters::find();
SMTPRelayServerName relayServer;
SMTPPortNumber portNumber;
SMTPUserName userName;
SMTPPassword password;
InteropPermission interopPermission = new InteropPermission(InteropKind::ComInterop);
FileIOPermission fioPermission;
System.Exception e;
SysMailer mailer = new SysMailer();
//report variables
SrsReportRunController ssrsController = new SrsReportRunController();
SalesInvoiceContract salesInvoiceContract = new SalesInvoiceContract();
SRSPrintDestinationSettings printerSettings;
CustInvoiceJour custInvoiceJour;
smmParametersTable smmParametersTable = smmParametersTable::find();
Filename fileName;
str fromAddress;
str toAddress; //inbound parameter
str subject;
str body;
SalesId salesId;
InvoiceId invoiceId; //inbound parameter
doc = new XmlDocument();
doc.loadXml(xmlPayload);
element = doc.documentElement().selectSingleNode("//InvoicePrint");
fromAddress = element.getNamedElement("FromAddress").text();
toAddress = element.getNamedElement("ToAddress").text();
subject = element.getNamedElement("Subject").text();
body = element.getNamedElement("Body").text();
invoiceId = element.getNamedElement("InvoiceId").text();
SalesId = element.getNamedElement("SalesId").text();
// Add record
if (invoiceId)
{
selectfirstOnly custInvoiceJour
where custInvoiceJour.InvoiceId == invoiceId;
//where custInvoiceJour.InvoiceId == invoiceId || custInvoiceJour.SalesId == SalesId;
fileName = strFmt("%1\\%2.pdf", smmParametersTable.SSSCVArchivePath, invoiceId);
/* fioPermission = new FileIOPermission(fileName ,"RW");
fioPermission.assert();
interopPermission = new InteropPermission(InteropKind::ComInterop);*/
interopPermission.assert();
// Define which report design to print
ssrsController.parmReportName("SalesInvoice.ReportTFS"); //ssrsReportStr(SalesInvoice, ReportTFS));
ssrsController.parmReportName(ssrsReportStr(SalesInvoice, ReportTFS));
// Ddefine how we want to execute the report (right now or batch style)
ssrsController.parmExecutionMode(SysOperationExecutionMode::ReliableAsynchronous);
// Hide the report dialog
ssrsController.parmShowDialog(false);
// Need to populate the required parms for the current sales order controller
salesInvoiceContract.parmRecordId(custInvoiceJour.RecId);
salesInvoiceContract.parmCountryRegionISOCode(SysCountryRegionCode::countryInfo());
salesInvoiceContract.parmDocumentTitle('Invoice');
// Link the contract to the controller so we know how to run the dp
ssrsController.parmReportContract().parmRdpContract(salesInvoiceContract);
// Link the printer settings to the controller
printerSettings = ssrsController.parmReportContract().parmPrintSettings();
// Print to HTML and always overwrite if the file exists
printerSettings.printMediumType(SRSPrintMediumType::File);
printerSettings.fileFormat(SRSReportFileFormat::PDF);
printerSettings.overwriteFile(true);
printerSettings.fileName(fileName);
// Run & save the report
ssrsController.startOperation();
if (printerSettings.fileName())
{
if (parameters.SMTPRelayServerName)
relayServer = parameters.SMTPRelayServerName;
else
relayServer = parameters.SMTPServerIPAddress;
portNumber = parameters.SMTPPortNumber;
userName = parameters.SMTPUserName;
password = SysEmailParameters::password();
subject = subject;
body = body;
try
{
// interopPermission = new InteropPermission(InteropKind::ComInterop);
//interopPermission.assert();
mailer = new SysMailer();
mailer.SMTPRelayServer(relayServer,portNumber,userName,password, parameters.NTLM);
mailer.fromAddress(fromAddress);
mailer.tos().appendAddress(toAddress);
mailer.subject(subject);
mailer.htmlBody(body);
mailer.attachments().add(printerSettings.fileName());
mailer.sendMail();
//CodeAccessPermission::revertAssert();
//info("Email has been send!");
}
catch (Exception::CLRError)
{
e = ClrInterop::getLastException();
while (e)
{
info(e.get_Message());
e = e.get_InnerException();
info(strFmt("%1", e));
}
}
}
CodeAccessPermission::revertAssert();
}
else
info("No invoiceId selected");
return"OK";
}