Monday, August 5, 2019

Interview Question : Microsoft Dynamics 365 Finance and Operation Technical (D365FO)


Few days back I attended D365FO technical interview. I am listing down the questions which I remember now. Actually these questions were asked during the first round of interview.




  1. How to convert currency code to your local currency code in x++?
  2. What are the extension classes used in reports?
  3. What are the types of delete action?
  4. What is platform update and Application Update in D365FO?
  5. What is equivalent of AIF in D365?
  6. How you will write query based on Salesline and InventTrans table?
  7. What is common datatype and what is its use?
  8. what is the datatype of recid?
  9. what is the main limitation of SimpleListDetail Form?
More questions I will post.

Thanks,
Uma

Wednesday, July 31, 2019

How to disable New button in Action Pane on a Form


In the screenshot attached the actionpane "New" button is disabled. This can be done by changing form datasource property (Allow Create) which is shown in the below screenshot.







Friday, July 26, 2019

Disable users in AX using Sql Query


Open SSMS> New Query> Copy paste and run the query


update USERINFO SET ENABLE=0
where NAME in ('Uma Shankar')



You can disable multiple users by passing comma separated user names in the where condition.


Thanks,
Uma

Thursday, July 25, 2019

How to restrict filter on a form field using (RangeStatus::Locked) X++




Whatever date is chosen in the From Date filter only that date data should display on form. And on the form field a user cannot apply filter. This can be done by setting (RangeStatus::Locked) in x++. e.g.




Tuesday, July 23, 2019

How to get cost price of an Item based on Warehouse X++

public  real  GetCostPrice(ItemId _itemId, InventLocationId _inventLocationId)
    {
        InventDimParm inventDimParm;
        InventOnHand inventOnHand;
        InventSum inventSum;
        InventDim inventDim;
        ;

        select firstOnly1 inventSum where inventSum.ItemId == _itemId;
       
        //inventDim.InventSiteId = "SiteId";
        inventDim.InventLocationId = _inventLocationId;
        inventDimParm.initFromInventDim(inventDim);
        inventOnHand = InventOnHand::newItemDim(inventSum.ItemId, inventDim, inventDimParm);
        return inventOnHand.costPricePcs();
       // info(strfmt("%1", inventOnHand.costPricePcs()));
    }

Thanks
Uma

Get OnHand Stock value using Warehouse, Date and ItemId using X++

 public real GetOnHandStock(InventLocationId _warehouse,TransDate _transDate,Itemid _itemid)
    {
        InventDim                   inventDim;
        InventDimParm               inventDimParm;
        InventLocation              inventLocation;
        InventSumDatePhysicalDim    inventSumDatePhysicalDim;
        real                        OnhandQty;
        inventLocation              = InventLocation::find(_warehouse);
        inventDim.wMSLocationId     =inventLocation.WMSLocationIdDefaultReceipt;
        inventDim.InventLocationId  = inventLocation.InventLocationId;
        inventDim.InventSiteId      =inventLocation.InventSiteId;
        inventDim                   = InventDim::findOrCreate(inventDim);
        inventDimParm.initFromInventDim(inventDim);
        OnhandQty                    =    InventSumDatePhysicalDim::onHandQty(_transDate,_itemid,inventDim,inventDimParm);
        return OnhandQty;
    }

How Get Item Group Name (ItemGroupName) of an ItemId using x++

Get Item Group Name (ItemGroupName) of an ItemId using x++

class ItemGroupName
{  
    public static void main(Args _args)
    {     
        InventItemGroupItem                 inventItemGroupItem;
        inventItemGroupItem=InventItemGroupItem::findByItemIdLegalEntity('256473');
    // 256473 is Item Number
        info(strFmt("%1", inventItemGroupItem));
    }
}


Thanks
Uma

Get Enum Id and Enum Value in D365FO using SQL and X++

 Below is the sql get enum id and enum value of a enum in D365 F&O using sql. SELECT   enumidtable . NAME           'Enum Name' ...