How to copy dll to MPOS client - Dynamic  365 FO - Retail

 How to copy dll to MPOS client - Dynamic  365 FO - Retail

Song Nghia - Technical Consultant


Copy file to ext folder in bin of Microsoft Dynamic 365.

Because universal app running inside of services. So we can not copy directly to folder ext.

Run this command to accept copy file to this folder:

"taskkill /IM dllhost.exe /F"

This is advice from Microsoft.



Import - Export Model Dynamic AX 2012

 Import - Export Model Dynamic AX 2012


Song Nghia - Technical Consultant

1. Create model

AOT ->Tool->Model management->Create new model
2. Export model to .axmodel file:

Dung window power shell hoac dung Microsoft Dynamics AX pewer shell.
2.1 chuyen den thu muc cai dat cua file config.

EX: C:\Program Files\Microsoft Dynamics AX\60\Server\vtv_vn_dax63_cu12_hrp_staging
Cu phap: cd “C:\Program Files\Microsoft Dynamics
AX\60\Server\vtv_vn_dax63_cu12_hrp_staging”.

2.2 chay chuc nang Export cua Axutil.exe thanh file MyFile.axmodel.
Cu phap: “PS C:\Program Files\Microsoft Dynamics
AX\60\Server\vtv_vn_dax63_cu11_std_demo\bin> axutil.exe export /file:E:\USER.axmodel
/model:"SYP Labels"
(maybe ./axutil.exe)

3. Import model from .axmodel file:

Dung window power shell hoac dung Microsoft Dynamics AX pewer shell.

3.1: chuyen den thu muc cai dat cua file config.
EX: C:\Program Files\Microsoft Dynamics AX\60\Server\vtv_vn_dax63_cu12_hrp_staging
Cu phap: cd “C:\Program Files\Microsoft Dynamics
AX\60\Server\vtv_vn_dax63_cu12_hrp_staging”.

3.2 chay chuc nang Import cua Axutil.exe from file MyFile.axmodel.
Cu phap: “PS C:\Program Files\Microsoft Dynamics
AX\60\Server\vtv_vn_dax63_cu11_std_demo\bin> axutil.exe import /file:E:USER.axmodel /Verbose”

See document: 


Configuring Microsoft Dynamics AX 2012 Alerts and Email

 Configuring Microsoft Dynamics AX 2012 Alerts and Email Notifications
Using an SMTP Email Relay Server with Office 365

Song Nghia - Technical Consultant

With more AX Server machines being run in the cloud on Microsoft Azure we need a simple way to
connect Dynamics AX 2012 to cloud hosted mail servers without the need to run Exchange server in
the same Azure virtual network (vnet) as our Dynamics AX servers. Currently the demo images that
Microsoft provides for download all rely on a dedicated VM (AX2012R2B) running Exchange Server to send email alerts and workflow messages. This is not a practical or a realistic current scenario with
Dynamics AX servers running on Microsoft Azure. The Life Cycle Services demo image that gets
generated does not even include a mail server image to distribute notification emails. Today with
more clients running with Office 365 we need a way to connect our hosted AX servers to a cloud
hosted email service.
The challenge is that most cloud based email services running today require SSL or TLS secure
encryption for authentication and unfortunately Dynamics AX 2012 does not support this additional
authentication natively. There are a number of ways to customize Dynamics AX to support this
additional secure authentication but it is much easier to use a Windows Server Simple Mail Transfer
Protocol (SMTP) server as a relay. There are no additional costs to run an SMTP server as this is a
feature included in Windows Server. This article will walk through the steps to configure the
Windows Server 2012 R2 SMTP Feature to act as a relay to Office 365 as well as how to configure
Dynamics AX mail settings to support this scenario.
First consider where to install the SMTP service in your production environment. If you are using
Workflow extensively you will have at least one dedicated workflow batch server. Depending on the
volume of messages consider placing the SMTP service on this dedicated workflow batch server.
Avoid installing the SMTP service on the production database server as a best practice. However for
demo systems it works fine to include the SMTP service on the all in one server machine. For this
article we will configure the SMTP service on a Dynamics AX2012 R3-CU8 demo image generated
from Life Cycle Services.
This article only covers email alert and workflow messages. Microsoft also now has integration with
Exchange Server either on premise or on Office 365 for the Sales and Marketing module for
Account/Contacts, tasks and calendar. This integration is available but not in the scope of this article.
One more note about flooding SMTP messages from your server to the mail provider. You want to
avoid any extremely large volumes of relay messages so you don’t get blacklisted. Just keep this in
mind to avoid this situation.
We will cover the following topics throughout this article:
 Installing the SMTP Server
 Configuring the SMTP Server
o Testing SMTP Relay Messages
o Troubleshooting SMTP eMail Sending
 Configuring Dynamics AX to use Windows SMTP Server
 Configuring Alert eMail Messages
 Testing Alert eMail Messages
 Using Gmail as an SMTP Mail Server

Full document:




SrsReportRunPrinter Sent email with template

 SrsReportRunPrinter Sent email with template

Nghia Song - Technical Consultant

/// 
/// extesion of SrsReportRunPrinter
/// 
[ExtensionOf(classStr(SrsReportRunPrinter))]
final class LAW_SrsReportRunPrinter_C_Extension
{
    public SrsReportDataContract  dataContract;
    public PurchPurchaseOrderContract   purchPOContract; 
      

    public str buildEmalBody(PurchId _purchID)
    {
        PurchTable      purchTable = PurchTable::find(_purchID);
        PurchTotals     purchTotals;
        str             emailHeader,emailBody;

        purchTotals     = PurchTotals::newPurchTable(purchTable);
        purchTotals.calc();
        real            totalAmount = purchTotals.purchTotalAmount();
        emailHeader = strFmt('

Dear %1,

',purchTable.vendorName()); emailHeader += '

Good Day.

 

Please see attached P.O. for items to be delivered based on the Shipment date.

'; emailBody += strFmt('',_purchID, totalAmount,purchTable.DeliveryDate,InventLocation::find(purchTable.InventLocationId).Name); return emailHeader + emailBody; } /// /// extens to update Purchase Id incase of docoment called from PurchPurchaseOrderContract rdp /// public void printReport() { RecId recordId; SysIMailerNonInteractive mailerFail; PurchId purchId; Object objRdp = this.reportContract.parmRdpContract(); str emailBody; if (objRdp is PurchPurchaseOrderContract) { purchPOContract = objRdp; recordId = purchPOContract.parmRecordId(); purchId = VendPurchOrderJour::findRecId(recordId).PurchId; emailBody = this.buildEmalBody(purchId); printSettings.parmEMailBody(emailBody); } next printReport(); if (mailer && mailer.emailId) { if (recordId && purchId) { SysOutgoingEmailTable outEmail = SysOutgoingEmailTable::find(mailer.emailId,true); if (outEmail) { outEmail.LawPurchId = purchId; ttsbegin; outEmail.update(); ttscommit; } if (outEmail.Status == SysEmailStatus::Failed) { str toAddress = SrsReportRunMailer::lawBuildUserEmailAddress(PurchTable::find(purchId).CreatedBy); str fromAddress = outEmail.Sender; str mess = strFmt("@LAW:LAW_G02010107_01",purchId); mailerFail = SysMailerFactory::getNonInteractiveMailer(); //send fail email back to sender var messageBuilder = new SysMailerMessageBuilder(); messageBuilder.setFrom(fromAddress) .addTo(toAddress) .addCc("") .setSubject(mess) .setBody(""); boolean result = mailerFail.sendNonInteractive(messageBuilder.getMessage()); //end } } } } }
Store name/WH nameP.O.#P.O. AmountShipment/Delivery Date:
%4%1%2%3