Posted in Functional Understanding, Uncategorized

Workflow : Use custom field on Workflow condition

In workflow configuration we usually got requirements to add condition on Steps. Some time we also need to create new fields and use in the conditions.

If you want to use the new field in Workflow conditions, Simply add it in your workflow Document query from table.

For example for Purchase requisition workflow, the document query is “PurchReqDocument” .Just add your newly created field in this query.

For Amount field, the general error in conditions while activation of workflow is

A currency code must be specified for an amount field

If it is the custom field , you have to select the below highlighted properties of the field in order to select/resolve currency error on workflow configuration

WorkflowTable.png

Simply Click on the red Highlighted area and select currency. BOOMMM !!!! Error resolved

WorkflowConfiguration.png

 

 

 

 

Advertisements
Posted in Code Snippets, Functional Understanding

Delete All Transactions in a Company

Today i got a requirement from my Functional team to delete only the posted transactions, not the configurations and master data as he has to test some scenarios.

To Achieve this i found a class in AOT named as “SysDatabaseTransDelete” .On further drilling i figure out that this class is checking the table types differently for global and company specific .

TableHandling

 

To run, Simply go to AOT (CTRL + D) -> Classes ->  SysDatabaseTransDelete ->right click on class and select Open -> Click Yes to delete all the transactions on the current company .

1

Note : Make Sure you have selected the right company, there is No return point. it is better to take the backup before performing this step.

 

 

 

Posted in Functional Understanding

Procure to Pay (Part 2)

In Part 1, we have created and confirmed the Purchase Order. Today we will create the registration and Packing slip.

Registration:

Products that are received in a warehouse might go through quality inspection before they are put away into inventory. Either quality orders or quarantine orders can be used to perform quality inspection. If quality orders are used, you can configure the process to temporarily block products through a reservation while they are inspected. If quarantine orders are used, products are moved to another warehouse for inspection. This warehouse is known as the quarantine warehouse. In both quality inspection processes, some of the goods might be scrapped, either because they don’t conform to the quality expectations or because the quality inspection involves destructive testing of a sample of the product.

RegistrationNavigation

Registration10QtySelect the Ordered status Line and click on Add button. Enter Location and the Qty you want to register , I have registered 10 Qty .By doing that i am insuring that I have registered my qty to partially receive.

We can do multiple registrations here on different Warehouse, locations and sites.System will reserve the qty for entered location.

On Hand Inventory:

We have a new guest now in our On-Hand transaction form with the status as Registered.

OnhandRegistredQty

Financial Impact:

Till now there will be no financial impact in the system.

Packing Slip (GRN):

Product receipt action on the Purchase orders page is used to mark products as Received on the PO. The Posting product receipt page has various options for the quantity that is accounted as received. For example, you can set the Quantity field to Ordered quantity or Receive now quantity. Alternatively, if a warehouse arrival process has been used, you will often set this field to Registered quantity. You can modify the quantities on each order line that will be marked as Received, to account for any discrepancies, such as under-delivery and over-delivery. During product receipt, you must specify a product receipt identifier, which is typically a reference to the packing slip from the supplier. This identifier is required for accounting, because it enables checks or audits of supplier packing slips against what has been received, and the accounted inventory or expense.

Product Receipt can be accessible from the purchase order header area. Click ReceiveProduct Receipt. The Product Receipt form opens.

GRNNavigation

 

In product receipt form we have multiple options, In our case we have registered 100 qty to receive partially, So to make the GRN of that partially registered qty i am selecting “Registered Quantity”

GRNPostingOptions

Product receipt number on line is mandatory, On selection of Registered Quantity from the option, our registered line is appearing with the registered qty, Enter site, warehouse and Location. Click Ok to create the Packing Slip

GRNPostingScreen

This will create Packing slip Journal with 10 Qty.

GRNJournalGRNLines

On Hand Inventory:

On partial receiving of product, On hand status is changed from Registration to Received and 90 yet to received.

Onhand_GRNStatus

Financial Impact:

This is the first time that GRN will leave any financial impact on Dynamics. following entry will be created by system. Product receipt Type account will be Debit and Purchase, accrual type will be Credit.

GRNAccountingEntry

You can Setup these accounts in Item  -> Item Group

ItremGroupAccounts

 

Tip:

If Accounting distribution is missing on line which is of item type, either item Group is missing on Item or Account is missing on Item Group

Accounting Distribution on Line is defaulting from Item -> Item Group -> Purchase order -> Purchase expenditure un-invoiced.

AccountingDistribution

 

Summary:

We have created Registration and GRN in today’s Post with their Inventory and financial Impact. In my Last post i Will cover the Invoice and Payment Part of the process.

 

 

 

 

Posted in Functional Understanding

Procure to Pay (Part 1)

The purpose of this blog series is to provide the basic understanding of procure to pay flow in Dynamics for a Developer.

In this Blog Series, i will try to cover the technical and functional aspects of Full payment Cycle Step  by Step with inventory and financial impacts, also the Basic Account setup and things which will help a developer to better understand the cause of errors.

Standard Procure to Pay Cycle :

Procure to pay Cycle

For this Example i am using two new items and Vendor (Chase Value Center)

  • Shirts
  • Trousers

Purchase Order:

I am skipping Purchase requisition Step and starting from Purchase order as Purchase requisition is just for approval and analysis that either we need the items or not .

I  have created PO for Vendor “Chase Value Center” with Both Items with 500 Qty each. (Assuming to have the knowledge, how to create PO)

PurchaseOrder

Tip:

In Header view of PO, If financial dimension is missing check the vendor Master financial dimension, At the time of creating PO Financial dimensions will be defaulting from Vendor.

On Hand Inventory:

Inventory transactions can be viewed from the purchase order line area. Click Inventory > Transactions. The Transactions form opens..

OnHand Navigation.png

In our case, we have created a purchase order. So, the item on purchase order lines must have inventory transactions of the Ordered status.

PO_Onhand_Ordered

The main inventory transaction fields are item ID, item dimensions, quantity, and item status. Item status is divided to Receipt and Issue statuses.

Receipt statuses are used when items are received into a warehouse. Issue statuses are used when items are issued from a warehouse.

Financial Impact :

Till now there will be no financial impact in the system.

Confirmation:

POConfirmationNavigation

There is also an option to generate a pro-forma confirmation for an order before the actual confirmation has been processed. This option just creates a report that you can share with the vendor. It doesn’t create any journal information.

On Confirmation A journal is created to store an exact copy of what was confirmed in the system. Sometimes, orders require changes, and additional journals are created after the updated order is confirmed. These journals let you view the history of the various versions of the order that were confirmed.

On Confirmation Step Accounting distributions are also created, and order checks and budget checks occur if this functionality has been enabled. If either check fails, you receive an error message that states that changes must be made to the PO before it can be confirmed again.

On Hand Inventory:

Confirmation will not impact the Inventory.

Financial Impact :

Till now there will be no financial impact in the system.

Report name : PurchPurchaseOrder

Classes :

  • PurchPurchaseOrderContract
  • PurchPurchaseOrderDP
  • PurchPurchaseOrderController

 

Summary :

Till now we have created and Confirmed the PO. In Part 2 we will Create registration , packing Slip and Invoice and will see the Financial and inventory impact step by step in detail.

 

 

Posted in Code Snippets

Invoice Date of Posted Project transactions

Sample code to get the invoice date of Posted Project transactions, This method is used on ProjPostedTransView to dipslay the invoice date on Posted project transactions Form.


display transDate InvoiceDate(ProjPostTransView _projPostTransView)
{
ProjInvoiceLines projInvoiceLines;
ProjInvoiceJour Invoicejour;
ProjCostTrans projCostTrans;
ProjItemTrans itemTrans;
GeneralJournalEntry gjEntry;
Voucher voucher;

if (_projPostTransView.ProjTransType == ProjTransType::Cost)
{
voucher = ProjCostTrans::find(_projPostTransView.TransId).VoucherJournal;
}
else if (_projPostTransView.ProjTransType == ProjTransType::Item)
{
voucher = ProjItemTrans::find(_projPostTransView.TransId).VoucherPackingSlip;
}

if (!voucher)
{
projInvoiceLines = new ProjInvoiceLines(_projPostTransView.ProjTransType,_projPostTransView.TransId);
projInvoiceLines.run();

voucher = ProjInvoiceJour::find(projInvoicelines.tmpProjInvoiceLine().InvoiceId , projInvoicelines.tmpProjInvoiceLine().InvoiceDate).LedgerVoucher;

}

return GeneralJournalEntry::findBySubledgerVoucher(voucher, curext()).AccountingDate;
}

Posted in AX Administration

Auto log off Dynamics AX

 

We have an option of auto log off  , By default it’s Zero which means unlimited, In certain scenario we have requirements to auto log off Dynamics Sessions when idol for certain period , Let say close Dynamics AX session after 30 minutes. then just Change 0 to 30 on user which you want to log off.

System administrator -> All Users

You can check here : Option 1

User1

You can check here : Option 2

User2