Showing posts with label AX Functional. Show all posts
Showing posts with label AX Functional. Show all posts

April 01, 2021

How to get meta data of an Data Entity MSDynD365

Hi Folks,

Here we got one awesome update on D365FO data management, now you get metadata of any data entity in a very useful format in an excel file.  You will get the below information for each data entity.





Let's see how to get that, go to the "Data management" workspace and click on the "Data entity" tile.
Select your data entity and in the menu bar select the "Get metadata" button.



The system will download the metadata in an excel file even for any custom field or entire custom data entity, pl find below a sample file for the Vendor Group.

Cheers!!!

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

January 28, 2021

QuickFix: Maintenance mode doesn't activate

Hi Folks,

While trying to bring your Tier-1 environments in maintenance mode using SSMS, system may take longer than expected even after multiple time ISS reset using CMD.

Try this, Open Visual studio (type DevEnv in windows search bar) and click 'Dynamics 365' menu then select ‘Restart IIS Express’ this will bring your system into maintenance mode immediately.



-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

July 02, 2020

[Solved] Issue with data entity EcoResReleasedProductCreationV2Entity - Error executing code. The field with Id '0' does not exist in table 'InventTableModule

Hi Folks,

There are two data available in system EcoResReleasedProductV2Entity and EcoResReleasedProductCreationV2Entity with a similar appearance. Let’s first understand the use of each, To create release products in the system user has to use EcoResReleasedProductCreationV2Entity while updating release products user have to use EcoResReleasedProductV2Entity.

Now let's discuss the error which I was facing while using EcoResReleasedProductCreationV2Entity data entity to create release product. Below is the error message.

"Result: Error executing code. The field with Id '0' does not exist in table 'InventTableModule'. "

Now to fix this issue you need to install one hotfix in your system which is suggested by Microsoft. Go to your LCS project and search for KB4559650, 


now you have to install this KB on your machine. On successful deployment, you should be able to use this data entity to release product import.

Cheers!!!

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

September 02, 2019

Set up MT940 format for bank reconciliation #MSD365FO

Hi Folks,

In D365FO advance bank reconciliation is a feature to import bank statement file and automatically reconcile with related bank accounts. There are many formats which a bank commonly used i.e. ISO20022, MT940, BAI2.

In this post, we will see how to set up the MT940 format which is commonly used in most banks nowadays.

Let's get started.

Step 1: Get sample entity template and transformation files
To transform the source file into FnO format, you need few files and these are available under 'Resources' node of AOT. Files names are as below



Step 2: Create an import project
Under Data management workspace, create an import project with name MT940. Add a new file with below details
I. Entity Name: Bank statements
II. Upload file name: SampleBankCompositeEntity (which you got from Resource node)



Once file successfully uploaded, click on view map. On next screen select BankStatementDocumentEntity from the list and click on 'View Map' and go to 'Transformation' tab. Click new and click upload file, select different XLST file one by one, in the sequence shown in below image.



Step 3: Setup Bank statement format
Navigate to Cash and Bank management > Setup > Advance bank reconciliation setup > Bank statement format.
Here create a new record as below



Step 4: Configure the bank account to use Advance reconciliation option
Navigate to Cash and Bank management  > Bank accounts. Select a Bank account to view details. Under Reconciliation tab,
I. Set the 'Advance bank reconciliation' option to 'yes'. This is a one-time setup, the system doesn't allow to undo/change once set to yes.


II. Set Statement format field to format which we have created in step 3 i.e. MT940




Step 5: Testing
Navigate to Cash and Bank management  > Bank accounts. On Reconcile tab click on Bank statements.
On the next screen click on Import statement. A dialog will pop up. Fill/select details as below

I. Import statement for multiple bank account in all entities. : Set this as Yes if your file contains more than one bank accounts.
II. Bank Account: If the source file contains a single bank, select that bank here.
III. Statement Format: Select your statement format here it must be MT940.
IV: Bank statement file import: Select source file and click upload.
V: Click ok and it must import transaction in the current form.

Note: After every DB refresh you need to redo import project. DB will break the links and you need to remove the entity from your import project and add upload the transformation files accordingly.

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

PS: This post referred to MS documentation. 

February 01, 2019

[Solved] Error while generating vendor payment #MSDyn365FO

Hi Folks,

I was getting an error while generating a payment journal, thought accounts payable. Here are a quick summary and solution on the same. 

Error: While creating payment Journal and Click on Generate payments button system throwing below error
Generate payments Message details Cannot edit a record in Journal lines (LedgerJournalTransPayment_BR). The record has never been selected














Possible Reason:
It might be coming to a new environment where you never did a setup for payment method, that you are using in your journal.

Solution:
1. Go to Methods of payment(Purchase Ledger /Accounts payable > Payment setup > Methods of payment). Select the method with you are using in your journal. Let's take Cheque for eg.
2.  GO to file format tab and check value under field ‘Export format’, which belongs to BR country-specific features.






Ideally, it should match the method of payment. But here its ‘Configurable layout file’ which is not a Cheque layout.

















3. So now click on the Setup button and add Cheque in selected formats. Save it and close




















4. Change to cheque
















5. Now try to generate payment again, it should work.

Cheers!!!

Harry
Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

January 11, 2019

General Electronic Reporting (GER) configuration Import in new environment

Hi Folks,
Generic Electronic Reporting (GER) aka Electronic Reporting (ER) is a great tool to configure document formats for both incoming and outgoing electronic documents in accordance with the legal requirements of various countries/regions. The ER engine lets business users use GER without the help of a developer OR any change in code, as users configure the document formats instead of code development. The user can create different types of documents like JSON, PDF, EXCEL, WORD, XML, and TEXT to support different system requirements. For more details on GER refer to MS documentation here.

Now let's see how to move GER configuration from dev to another environment. Once you complete all your change in the respective model or format, change the status to complete with some meaningful description. Post that system will create one more version with a draft.
image

Now you can change the status of a completed version to Shared. If you are facing any error, double-check if the configuration repositories are configured properly with LCS. Once you shared a version it will be available on LCS to import in any other environment. You can see them in your LCS project. Log in into https://lcs.dynamics.com/v2/

image

Now in the new environment, make sure you configured repositories properly for both operation and LCS. Select LCS and click Open.
image

In the next screen post-LCS connection authorization you must see all customized reporting configuration that is shared over LCS. Select your desired configuration, select the right version, and Import it.
That's it….. Smile The configuration is successfully imported into your current machine and ready to use. If you are importing a format, make sure the respective data model already exists in your environment. If it's not there you should import the data model as well.

Cheers…
Harry

August 03, 2018

Change a person on User in Dynamics 365 FO

Hi Folks,

Recently I uploaded my first video on youtube regarding a basic thing, I hope you will like it.




-Harry Follow us on Facebook to keep in rhythm with us. @Facebook

September 13, 2015

How to Export/Import Label files in AX 2012

Label are pretty different in AX2012 instead of earlier version of AX. Here is quick steps to import and export Label files from one Environment to other. You also perform an update on label files.
Export a Label file:
Open AOT, Expend Label node. Choose Label and require language to export. You can do it for individual language or you can select multiple language all in once.
image
Exported file will save on selected path with extension “.ald”.
Import Label File:
Right click on Label node in AOT and select “Create from File”, choose ald file to import than hit create.
image

image

Update a Label file:
Import the new updated label file system will ask to overwrite , go ahead
image
It will update your existing Label file.
Note: You must run full Synch after every import/Update.
More info: https://technet.microsoft.com/en-us/library/gg731886.aspx
-Harry

April 13, 2015

System trade line number increment is not specified.

Hi Friends,

I faced one Error while creating Purchase Order from Approved Purchase Requisition
Error Message:
System trade line number increment is not specified.
Purchase order creation has been cancelled due to errors

clip_image001

Reason: As mentioned in error message there is one parameter missing.'

Possible Solution:Click on “System Parameter” from infolog window or go to
System administration -> Setup -> System Parameter
Under System Line Number, Change the increment from 0 to 1.

clip_image002

Now try again to create PO.

clip_image003

Double click on purchase order number to open PO from.

- Harry

March 27, 2015

Auto Settlement of Sales Invoice in AX

In an organization where thousands (or more) of sales transaction happening every day, and here is this auto settlement requirement comes in picture. Auto settlement process save a ton of time to manually settlement of each and every customer or record. There are three different ways to perform a auto settlement of the sales invoices.

1. By Sales parameter select auto settlement.
2. By select open transaction at the time of invoice posting
3. Through X++ code

1. By Sales parameter select auto settlement: Go to AR/Setup/Parameter under settlement tab you will found a check box for automatic settlement. Select this check box. And your system will auto settle your sales invoice.
clip_image002

This will settle a transaction whenever you post a payment journal.

2. By select open transaction at the time of invoice posting: You can also choose the open transaction at the time of invoice journal creation. At the time of invoicing click on “open transaction settle” button, this will open a new form to select records to be settle from open transaction of that customer.


clip_image004

clip_image006

3. Finally we have code as well (I love this part ;)): So here we are to do some tricky things. Yes, we can do the settlement by X++ code as well. Below code is an example in Job. You can use the same logic for any trigger point in AX.

static void theAxapta_AutosettlePayment(Args _args)
{
CustTable custTable;
CustTrans invCustTrans, payCustTrans;
SpecTransManager manager;
CustVendTransData custVendTransData;
;
custTable = CustTable::find("504411");
// Find the oldest unsettled invoice
select firstonly invCustTrans
order by TransDate asc
where invCustTrans.AccountNum == custTable.AccountNum &&
invCustTrans.TransType == LedgerTransType::Sales &&
!invCustTrans.closed;
// Find the oldest unsettled payment
select firstonly payCustTrans
order by TransDate asc
where payCustTrans.AccountNum == custTable.AccountNum &&
payCustTrans.TransType == LedgerTransType::Payment &&
!payCustTrans.closed;
ttsbegin;
// Create an object of the CustVendTransData class with the invoice transaction as parameter
custVendTransData = CustVendTransData::construct(invCustTrans);
// Mark it for settlement
custVendTransData.markForSettlement(CustTable);
// Create an object of the CustVendTransData class with the payment transaction as parameter
custVendTransData = CustVendTransData::construct(payCustTrans);
//mark it for settlement
custVendTransData.markForSettlement(CustTable);
ttscommit;
// Settle all marked transactions
if(CustTrans::settleTransact(custTable, null, true,
SettleDatePrinc::DaysDate, systemdateget()))
info("Transactions settled");
}

Enjoy…..

- Harry

April 17, 2014

Dynamics AX 2012 R3 Videos and Demos

Hi Folks,

Finally... Its Dynamics AX R3. There are many new thing to know about R3. Here are some videos for Dynamics AX. I hope you all will enjoy these videos.



Soon i will post more video links. If you are looking for downloadable copy of this video, just post your message in comment box.
All the best for Dynamics AX R3......

-Harry

December 29, 2012

Import Opening Stock Balance into Dynamics AX

Import Opening Stock Balance into Dynamics AX

When we import opening stock balance into inventory journal using the standard import/export functionality, the most common problem is dealing with Inventory Dimension id (InventDimId). We might know the warehouse and batch, but we do not know what is the InventDimId that represents the combination of these two inventory dimension.
One way to do this is to lookup the InventDimId value manually before performing the import. This is only possible if very few inventory dimensions are used.


An alternative is using the Custom import functionality to import stock balance CSV file into Tag counting journal.
There is a conversion functionality in the Custom import, where you can write a little X++ code to find the InventDimId using the inventory dimensions.
Here is an example of finding the InventDimId using Site and Warehouse dimension.




You must select Run conversion checkbox to activate the conversion. You may also use the compile icon (on the right hand) to validate the X++ code.
The purpose to use Tag counting journal instead of Movement/Counting journal is we let the system to create the Lot ID when we post the Tag counting journal into Counting journal.


- Harry

November 10, 2012

Designate a batch server


Designate a batch server

A batch server is an Application Object Server (AOS) instance that processes batch jobs. Batch jobs are used to run tasks, such as printing reports or posting journals, at a specified time and probably on a different computer.
The first AOS to be set up is automatically designated as a batch server. Use multiple batch servers to increase throughput and reduce the amount of time it takes to run batches.

When you set up a batch server, you can specify the times that it is available for batch processing. We recommend excluding a server from batch processing when it is busy with regular transaction processing. For example, you may have servers in different time zones. You can set server schedules so that each AOS is available for user traffic during the day and for batch traffic overnight.

For more information about batches, 
see the Applications and Business Processes Help, 
available from the Microsoft Dynamics AX Help menu. 

1. Click Administration > Setup > Server configuration.

2. Press CTRL+N to add a new batch server.

3. On the Overview tab, enter a server ID in the following format: InstanceName@ServerName.

4. Select Is Batch Server to enable batch processing on the server. 

5. On the Batch server schedule tab, enter the maximum number of batch tasks that can be run on the AOS instance at one time. The server will continue to pick up tasks from the queue until it reaches its maximum.

6. To specify when the server is available for batch processing, enter a starting time in the Start time field and an ending time in the End time field. Press CTRL+N to enter an additional time period.
Note: If the server is running a task when its batch processing availability ends, the task will continue running to completion. However, the server will not pick up any more tasks from the queue.

7. On the Batch server groups tab, use the arrow buttons to specify the batch groups that can run on the selected server. Batch groups are used to direct batch tasks to specific servers.

- Harry

November 08, 2012

Create Alert using X++ codes

Create Alert using X++ codes


Sometimes Infolog message is not sufficient enough for prompting information to users. It is possible to create alert message using code as an alternative. It is fairly simple to create alert message manually by just inserting a new record in EventTable where all the alert messages are stored. Below is a code snippet for creating alert using code in AX 2009.
Try following code......





static void CreateAlertUsingCode(Args _args)
{
EventInbox          inbox;
;
inbox.initValue();
inbox.ShowPopup     = NoYes::Yes;
inbox.Subject       = "This is the Alert subject";
inbox.Message       = "This is the Alert message";
inbox.AlertedFor    = "This alert is just information no links are available";
inbox.SendEmail     = false;
inbox.UserId        = curuserid();
inbox.TypeId        = classnum(EventType);
inbox.AlertTableId  = tablenum(Address);
inbox.AlertFieldId  = fieldnum(Address, Name);
inbox.TypeTrigger   = EventTypeTrigger::FieldChanged;
inbox.CompanyId     = curext();
inbox.InboxId       = EventInbox::nextEventId();;
inbox.AlertCreatedDateTime = DateTimeUtil::getSystemDateTime();
inbox.insert();
}
 
- Harry

November 07, 2012

SysQueryRangeUtil class -Use method name as query criteria(Reports)

SysQueryRangeUtil class - use method name as query criteria

This is a cool new feature in AX 2009 - you can now use a method name instead of literal value in query criteria!

For example, if you run a report every month, previously you need to change the date criteria in each month you running the report 
(ie.“01/06/2010..30/06/2010”,  “01/07/2010..31/07/2010”, etc).
Now you only need to enter (monthRange(0, 0)) which will automatic return the correct first day and last day of the month.

For Example: - 




You can also refer to the SysQueryRangeUtil class – there are a lot of useful methods such as dateRange(), currentEmployeeId(), etc. It’s also possible to create new method on this class for special purpose. But do this with caution.


- Harry

September 27, 2012

How to Restore deleted sales order or purchase order

How to Restore deleted sales order or purchase order in AX 2009






Hi Frnds,

Some times fortunately or unfortunately user delete a record from Purchase Order OR Sales Order Forms,
and it can be drag you in a big problems, Here I am sharing a trick to restore these deleted Order records.
When ever a record is deleted from a Form, it sits in the void tables. These orders can be viewed from

AR -> Inquiries -> History -> Voided sales order or AP -> Inquiries -> History -> Voided Sales order.

AP -> Inquiries -> History -> Voided sales order or AP -> Inquiries -> History -> Voided Purchase order.

Now from this form you can only view the deleted orders but there is not option of restoring them.
Below are some sample code, you can use this to restore the voided orders.

Sales order restoration:
static void restoreDeletedSO(Args _args)
{
    SalesTableDelete    salesTableDelete;
    SalesLineDelete     salesLineDelete;
    SalesTable          salesTable;
    SalesLine           salesLine;
    ;

    SalesTableDelete = SalesTableDelete::find('00450_036', true);
    ttsbegin;
    switch (salesTableDelete.Cancelled)
    {
        case Voided::Voided :
            salesTable  = conpeek(salesTableDelete.SalesTable, 1);
            salesTable.insert();

            while select forupdate salesLineDelete where salesLineDelete.SalesId == salesTableDelete.SalesId
            {
                salesLine = conpeek(salesLineDelete.SalesLine, 1);
                salesLine.insert();
            }
            salesTableDelete.delete();
            break;

        case Voided::linesVoided :
            while select forupdate salesLineDelete where salesLineDelete.SalesId == salesTableDelete.SalesId
            {
                salesLine = conpeek(salesLineDelete.SalesLine, 1);
                salesLine.insert();
                salesLineDelete.delete();
            }
            salesTableDelete.delete();
            break;
   }

   ttscommit;
}


Purchase order restoration:





static void restoreDeletedPO(Args _args)
{
    PurchTableDelete    purchTableDelete;
    PurchLineDelete     purchLineDelete;
    PurchTable          purchTable;
    PurchLine           purchLine;
    ;

    purchTableDelete = PurchTableDelete::find('00242_049', true);
    ttsbegin;
    switch (purchTableDelete.Cancelled)
    {
        case Voided::Voided :
            purchTable  = conpeek(purchTableDelete.PurchTable, 1);
            purchTable.insert();

            while select forupdate purchLineDelete where purchLineDelete.PurchId == purchTableDelete.PurchId
            {
                purchLine = conpeek(purchLineDelete.PurchLine, 1);
                purchLine.insert();
            }
            purchTableDelete.delete();
            break;

        case Voided::linesVoided :
            while select forupdate purchLineDelete where purchLineDelete.PurchId == purchTableDelete.PurchId
            {
                purchLine = conpeek(purchLineDelete.PurchLine, 1);
                purchLine.insert();
                purchLineDelete.delete();
            }
            purchTableDelete.delete();
            break;
   }

   ttscommit;
}



If you have any query for the same feel free to ask.  
-Harry

August 08, 2012

Update multiple records with 'Fill Utility'

Update multiple records with 'Fill Utility'

Note:- FOLLOW THIS STEPS ON YOUR OWN RISK,I WILL NOT BE RESPONSIBLE FOR ANY GOOF UPS. SO PLZ BE CAREFULL DURING THESE STEPS.
The Fill utility enables authorized users and/or administrators to mass-update records, similar to the find and replace functionality. We can use an alternative method also to Update Multiple records in Grid.
this utility assists administrators or users during implementations/Development or when business process changes affect multiple records.
Cautions:
1> It is recommended practice to take backup of entire database before performing this 'Fill Utility' operation.
2> It is recommended to use this feature during implementations/Development (or) when business process changes affect multiple records.
3> Please follow the standard procedure to enable this configuration. This may require restart of AOS & Data dictionary sync to make sure changes take immediate effect.
4> Be aware that changing numerous records at the same time can be time-consuming.
Enable configuration key:
Path: Dynamics Ax > Administration > Setup > System > Configuration > Under Administration tree (Enable 'Fill Utility' option)
Fill Utility usage:
Open the form that contains the field to update.
Example:  Dynamics Ax > Accounts Receivable > Common forms > Customer details > Select required customer record > payment tab

Right click on the field 'Ledger account' field > Record info

Click button 'Fill Utility'

We can select the criteria here
Click button 'OK'

Validate the records and click 'OK'

Select new 'Terms of payment' = N045 (here we have to specify new terms of payment)
Click 'OK'
Caution: Be aware that changing numerous records at the same time can be time-consuming.
Fill Utility log:
Path: Dynamics Ax > Basic > Inquiries > Fill Utility log

Security key: Adminfillutility
This completes 'Fill Utility' feature details from usage.
This a very useful to update multiple records at the same time.
- Harry

June 02, 2012

Document Handling In Axapta

Document Handling In Axapta


When we create a new word document through document handling , we can transfer data from tables in Microsoft Dynamics AX to bookmarks in the new document. This is done by creating a template with some standard text and some bookmarks where the data from tables are to be inserted. For example we can transfer the address and contact information for a customer to the letter head in a Microsoft Word document when creating a new letter for that customer.
Prepare a Word template :We need to create a Word template with bookmarks where the data should be inserted. Then we set up the document type by linking the document type to the template and by adding the data fields to be transferred to the individual bookmarks.
Step I : Create a Word template
1.            Open Microsoft Office Word.
2.            In the new template, add the text and graphics we want to appear in all new documents that we base on the template.
3.            Place the cursor where we want to insert data from Microsoft Dynamics AX and then click Insert > Bookmark.
4.            Type a meaningful name for the bookmark and click Add.
5.            By Repeating step 3 & 4 you can add more bookmarks as much as you require
6.            Save this template by extension .dotx







Note : It is important to use a table where more than one row of data is needed. e.g. if we are expecting to insert more than one invoices for a vendor as shown in the above screen shot. This will help maintain the format when the data is populated by the system. Otherwise the data will be distorted.
Step B : Link the template to a document type
1.            Click Basic > Setup > Document management > Document types.
2.            Select the document type that we want to link to a template.
3.            Click Options.
4.            In the Table list, select the table to associate with the template.
5.            In the Template file list, type the path to the template file or use the browse button to locate the file on the computer or network.
Class description:             Create Word document via COM
Group:                                  Document          


Step C : Add bookmark information to table fields
1.            Click the button “Option”.. In the Options form, On overview tab give the name of the table and path of the template file
    select the table that is linked to the template that we want to use.
2.            Select the Fields tab.
3.            Press CTRL+N to add a field to be transferred.
4.            In the Data table list, select a table to get data from.
5.            In the Data field list, select the data field to get data from.
6.            In Bookmark, type the name of the bookmark we have inserted in the document where the data will be inserted.
7.            Select Hard return to insert a line break after the data inserted (optional).
8.            Repeat step 3 through 7 to add more data fields to the list.
Note : The table we get the data from does not have to match the table selected on the Overview tab, but the two tables have to be related.
                The Document handling feature can only create one letter per invoice.
On Field tab select the AX table and fields as shown below in the screen shot . For each field give the Bookmark from the template.




Step D : Test the report
Go to vendor master and select a vendor whose invoices have been  pending / on hold.
Click document handling button. Indocument handling click the Button New and select the document type created in previous Step B.

A word document will be created with data for the vendor



Verify the data on the document. Pls note that the invoice number date and amount fields are nicely aligned . If the bookmarks had not been in a table in the template then the invoice details would have been distorted. ( try using  a template with bookmarks without table and see yourself )



These small steps can reduce your new report requirement.