16 September 2023

D365 F&O Data Management entity export for all companies data

 On the dataEntity properties "Primary company Context" property set to "DataAreaId" that means it will export the data on the current company.



To export all companies data:

 DataEntity properties "Primary company Context" property set to Emply  that means it will export the data on the current company



04 September 2023

Query missing QueryBuildDataSource for FormDataSource PurchTable in PurchTable form in D365 F&O

Query missing QueryBuildDataSource for FormDataSource PurchTable

when there is a new table PurchTableTAR in D365 F&O


AP-> Purchase Orders assigned to me

When I open this its getting the below error.

Query missing QueryBuildDataSource for FormDataSource PurchTableTAR


as newly added table in PurchTable Form.

As shown below is the query to be added new table which is added in the form as a DataSource.


New table added to the above query is composite query, inside there PurchTableListPage is the query to add the new table.









31 July 2023

Using Filter Expressions in OData URIs in D365 F&O

https://URL/data/CustomerGroups?$filter=CustomerGroupId eq '10'

https://URL/data/ResourceRequitionLines?filter=SFReqId eq '777787'

https://URL/data/ResourceRequitionLines?$filter=SFReqId eq @title&@title='777787'


24 July 2023

how to get the Inventory dimension combination ItemCategory in D365F&O


InventDimCombination    inventDimCombinationLoc;
InventDim               inventDimLoc,inventDimCombLoc;
select inventDimLoc where inventDimLoc.inventDimId == prodTable.InventDimId;
select inventDimCombinationLoc join inventDimCombLoc
where inventDimCombinationLoc.ItemId == prodTable.ItemId
&&    inventDimCombinationLoc.InventDimId == inventDimCombLoc.inventDimId
&&    inventDimCombLoc.InventColorId      == inventDimLoc.InventColorId
&&    inventDimCombLoc.InventSizeId       == inventDimLoc.InventSizeId
&&    inventDimCombLoc.InventStyleId      == inventDimLoc.InventStyleId
&&    inventDimCombLoc.configId           == inventDimLoc.configId;


23 April 2023

Dynamics 365 F&O SysOperation Simple example

 

class FMCustService extends SysOperationServiceBase

{

   public void processCustomerData( FMCustContract _contract)

   {

       CustTable   custTable;

       AccountNum account = _contract.parmCustAccount();

 

       while select custTable

           where custTable.AccountNum == account

       {

           Info(strFmt("%1",custTable.AccountNum));

       }

   }

}

 

internal final class FMCustController extends SysOperationServiceController

{

   public static void main(Args _args)

   {

       FMCustController custController = new FMCustController(classStr(FMCustService),

               methodStr(FMCustService,processCustomerData),SysOperationExecutionMode::Synchronous);

       custController.startOperation();

   }

 

   /// <summary>

   ///

   /// </summary>

   /// <returns></returns>

   public ClassDescription caption()

   {

       ClassDescription ret;

   

       ret = "Customer base operation";

   

       return ret;

   }

 

}

[DataContractAttribute]

class FMCustContract

{

   CustAccount custAccount;

 

   [DataMemberAttribute(identifierStr(CustAccount)),

      SysOperationLabelAttribute(literalStr("Customer account")) ]

   public CustAccount parmCustAccount(CustAccount _custAccount = CustAccount)

   {

       custAccount = _custAccount;

 

       return custAccount;

   } 

}






 

16 March 2023

JSON file format to generate for outbound in Dynamics 365 F&O

 

JSON file format to generate for outbound:

Class: formJsonSerializer

Contract class: pickListHeaderContract , need to pass all required values to contract class.


Str  sJSONHeader = FormJsonSerializer::serializeClass(pickListHeaderContract);

Merge Dimensions (MainAccountId and LedgerDimensions) defaultDimension in D365 F&O and X++

 public DimensionDynamicAccount getLedgerDimension(container _conData, TransDate _transDate = today()) {     int                            ...