Search This Blog

Wednesday 7 November 2018

Purchase Order Confirmation Report in Dynamics D365 for Finance and Operations

There are three types of Purchase Order Reports you can generate from Ops.

1. Purchase Order Confirmation.

2. Purchase Order Invoice.

3. Purchase Order Product Receipt.

In this Post, I will talk about only Purchase Order Confirmation Report and this post is basically related to the Configuration that we can enable and disable in the Purchase Order Confirmation Report.

First of all, I will show how to generate the Purchase Order Confirmation Report.

Below are the steps to generate the Purchase Order Confirmation Report.

Go to Accounts Payable -> Purchase Order -> all Purchase Orders.











Select the Purchase Order that is already Approved and then select Confirm button under Purchase Tab in the action section.














Once the Purchase Order is confirmed then its status will be changed to "confirmed" and the "Purhchase order confirmation"  button will be enabled under Journals section in Purchase Tab










Once you click that button a new form will open which contains the versions of this Purchase Order.















Click the Preview/Print button and select the option you want to print the report. if you want to print copy than select copy preview. if you want to print original then select original preview or if you want to use print management settings then use the select the Print Management.

I select the Orginal Preview.

Now Below is the output of the report.



























Now the above steps were related to generating the Purchase Order Confirmation Report.
There are some areas that I have highlighted in the above image. Values of these fields you can change at any time without the customization.

As you can see point 1 in the highlighted area is related to the Company Address, Telephone, Fax, Giro, Tax Registration Number.

These bits you can configure and change at any time. Below are the navigation and screenshot of the form where u can configure company address, telephone, fax etc.

Go to Organisation Adinistration -> Organisation -> Legal Entities

Select the record which is in your log in a company. In my case, it's in usmf.












as you can see in the above image I have highlighted the Address and Contact Information tabs.

In these tabs, you can configure the addresses and contact info. you can add multiple records as well but the records which are set to primary will appear on the PO Confirmation Report.

Now the second thing that I have mentioned in the report are the external header and line level notes that you can set up in Purchase Order Report.

First I will show how you can create header and line level external notes.

Open your Purchase Order Form like the one below:









Now click on the Purchase Order Header Button as highlighted above. Its color will change to blue as you can see in the above image after that click on the attachment button this is also highlighted in the above image.












Now as you can see once you click on the attachment a new screen is open where u can setup notes.

Just create the notes of type "Note" and then set the note text under notes section and set the Restriction to "External".

Note: if you set the restriction to internal than notes will be printed on PO Confirmation Report as internal notes are for internal use only. They are not for reports.

After that close that form and go back to the Purchase Order and then click on the lines and then click the attachment button.

The same new form will be open where you have to set up the External notes for lines.










As you can see in above image create the notes of type "Notes" and set the notes for line level external notes and then set the restriction to external.

Again just mentioning only external notes will appear on the report if the restriction is internal then notes will not appear on the report.

This was all for setting up the external notes. Now I will show you how you can set the configuration to show and hide these notes on PO Confirmation Report.

Just go to the Procurement and sourcing -> Setup -> Forms -> Form Setup












The two drop downs I have highlighted in the above image. First one is related to select to show either header level external notes or line level external notes or both or none of them.

The second drop down is related to the which type of Note you want to show. By default the notes type is Note.

Now the point number three that I have mentioned in the report is the external item number. That you can also show and hide.

On Purchase Order Line Details under the general tab, you can set up your external items number. Mentioned below for reference.












To show and hide this external item number on the report below is the navigation to the configuration form.

Just go to the Procurement and sourcing -> Setup -> Forms -> Forms Stup

 The drop i.e ITEM NUMBER that I have mentioned in the above image.if you set this to both than external item number will be visible on the PO Confirmation Report.

Now the fourth and the last thing that I have highlighted in the PO Confirmation Report is the Form Notes.

You can set up these form notes on the following navigation.

Procurement and Sourcing -> Setup -> Forms -> Form Notes

Select Purchase Order and then specify the notes.













if you don't specify any text on the form notes then nothing will be displayed on the purchase order confirmation report.

This was all related to the PO Confirmation Report. Feel free to Comment if you have any questions.

Thanks,
Zahid

Friday 20 July 2018

Deleting Usage Data in D365 For Finance and Operations

Select the Settings button on the top right corner of your screen and then select user options like this.










A new screen will open where select the usage data like this.












A new form will open where u can see the usage data in different types and areas. you can delete all usage data or specific usage data as well.

In my case, I have selected form selection and deleted the usage data related to the forms.









Now I will select the record from the form selection tab and click delete and then the framework will delete the usage data related to that specific form.

Note as mentioned earlier we can delete all usage or usage data specific to particular forms or area as well.












That's all feel free to comment if you have any questions.

Thanks,
Zahid

Tuesday 10 July 2018

what should be the best DataSource type on Data Entity in Dynamics D365 for Operations

Below is the link that contains the discussion on which type of DataSource on DataEntity is good in which scenario:

Feel free to post if you guys have any questions.

https://community.dynamics.com/365/financeandoperations/f/765/p/286025/822134#822134

Thanks,
Zahid


Friday 1 June 2018

Get Financial Dimension using default dimension through x++ code and Sql in Dynamics AX #D365forOps


Below is the X++ code snippet for getting the Financial Dimensions using Default Dimension by using X++ code:

private str getFinancialDimensionName(Name _dimAttrName, DimensionDefault _defaultDimension)
    {
        DimensionAttribute dimAttr;
        DimensionAttributeValueSetStorage dimStorage;
        DimensionAttributeValue     dimAttrValue;
        Common                      common;
        DictTable                   dictTable;

        select firstOnly dimAttr where dimAttr.Name == _dimAttrName;
        if(dimAttr)
        {
            dimStorage = DimensionAttributeValueSetStorage::find(_defaultDimension);

            select firstonly dimAttrValue
            where dimAttrValue.RecId == dimStorage.getValueByDimensionAttribute(dimAttr.recID)
            join dimAttr
            where dimAttr.RecId == dimAttrValue.DimensionAttribute;

            if (dimAttrValue)
            {
                dictTable = new DictTable(dimAttr.BackingEntityType);
                common = dictTable.makeRecord();

                if (common.TableId)
                {
                    select common where common.(dimAttr.KeyAttribute) == dimAttrValue.EntityInstance;
                    return common.(dimAttr.NameAttribute);
                }
            }
        }

        return "";
}

Where _dimAttrName = name of the dimension attribute like Department, Location etc

and _defaultDimension = value of the defaultDimension like value in DefaultDimension field of table HcmEmployment.

Below is the code snippet to get the department and location in Sql using default dimension.

select dimensionFinancialTag.description from  DefaultDimensionView
join dimensionFinancialTag on dimensionFinancialTag.VALUE = DefaultDimensionView.DISPLAYVALUE
    where DefaultDimensionView.DefaultDimension = 5637144783
      and DefaultDimensionView.Name = 'Location' 


select DisplayValue, dimAttributeOMDepartment.NAME from defaultDimensionView
 join dimAttributeOMDepartment
            on dimAttributeOMDepartment.Value = defaultDimensionView.DisplayValue
        where defaultDimensionView.DefaultDimension = 5637144783

            and defaultDimensionView.name = 'Department'

For Any Question feel free to Comment.

Thanks,
Zahid

Thursday 10 May 2018

Renaming Database Name using Query in SQL Server

Sometimes if we try to rename the database in our development or any other environment we got the error message that this database is in use by other process and we cant rename it.

So first we need to check if any user is not using that database and try to rename it. If still we got the same error then might be some services using that database.

Instead of investing time to investigate which service is causing the issue to rename the database you can simply write the below query to rename your database.

ALTER DATABASE oldatabasename SET SINGLE_USER WITH ROLLBACK IMMEDIATE;

ALTER DATABASE olddatabasename MODIFY NAME = newdatabasename

ALTER DATABASE newdatabasename SET MULTI_USER WITH ROLLBACK IMMEDIATE;


Thanks,
Zahid

Monday 30 April 2018

Virtual Fields in Data Entity in Microsoft Dynamics 365 For Operations

Some times we need to populate fields on Data Entity based on some calculated X++ logic instead of binding them directly from table.

To do this below are the some simple steps.

1. right click your fields node of your data entity and than select the string Unmapped field.














note: you can select other type of umapped field if your field is not string.

2. After that go to the properties of that field set the name , label , extended data type and is computed field to no.

























After that right click your data entity and than override the postLoad() method.

and in that postload method you can write your X++ logic to populate that field.













Now after that once you rebuild your code and try to export data entity you will see this field will be populated in data entity.

Note: Data entities are saved as view on back end in sql and the main drawback of using virtual field is that you can see them in sql.You can only see when you use that entity with in Dynamics Domain.

Thanks,
Zahid