Posts

How to Authenticating a client Application

Image
 Authenticating a Client Applications We can create multiple types of apps in AAD, Here we will discuss two kinds of Applications that are separated and supported in Microsoft AAD for Dynamics 365. 1. Native Client Application: This required a redirect URL, which Azure AD user to return a token response. This flow user a username and password for authentication and authorization. 2. Web App/ API: A confidential is an application that can keep a client's password confidential to the world. It uses a client APP ID and a client secret key to prepare client credentials.  Step1: Register Your Application in Azure AD (Active Directory) : Sign in to your Azure portal. Navigate to Azure Active Directory. Go to "App registrations" and register your native client application. Note down the Application ID (Client ID) generated for your app. Configure the Redirect URI to which the authentication response should be sent. It should match the URI you specify in your app. Step2: Configu...

Building a query Object through Code.

 Building a query object: Query objects in Dynamics 365 for Finance and Operations are used to build SQL statements for reports, views, forms, and so on. They are normally created in the AOT using the drag-and-drop functionality and by defining various properties. Query objects can also be created from the code at runtime. This is normally done when AOT tools cannot handle complex and/or dynamic queries. Build Query in X++:  Queries can also be built dynamically with X++ code. Both approaches are used in standard applications. One advantage of making the query dynamics is that it can not be public in the AOT, and is protected against unintentional AOT changes.  X++ Query Component QueryRun Query QueryBuildDataSource QueryBuildFieldList QueryBuildRange QueryFilter QueryBuildDynaLink QueryBuildLink QueryRun:  use query Run objects to execute the query and fetch data. Query:  The query object is the definition master. its own properties and has one or more dat...

Renaming of Primary Key

 Renaming of Primary Key through Code in X++ Hi Everyone, This blog explain how to renaming of primary key through code in the Dynamics 365 for Finance and Operations. Most of you who are familiar with the Dynamics 365 for Finance and Operations applications, have probably used the standard Rename function. This function allows you to rename the primary key of almost any record. With this function, you can fix records that were saved or created by mistake. This function ensures data consistency, that is, all the related records are renamed as well. In this blog I will explain how the record's primary key can be renamed through the code. As an example, we will create a job that renames a customer account. Step :  Create a new project, create a runnable class named CustAccountRename, and enter the following code snippet. class CustAccountRename {      public static void main(Args _args)      {             CustTable...

Add lookup to batch dialog

Image
Add lookup to Batch dialog Step 1: Creating a batch job parameter creates a contract class containing a reference to the UI builder class. Code:  [ DataContractAttribute ,     SysOperationContractProcessingAttribute (ClassStr(Name UI Builder Class))] class  Lok_CustomerPaymentContract {     LedgerJournalNameId     journalName;     [         DataMemberAttribute ,         SysOperationLabelAttribute (literalStr("As per required ")),         SysOperationDisplayOrderAttribute ('1')     ]        public   LedgerJornalNameId    parmJournalName(LedgerJournalNameId   _journalName =           journalName)   {        JournalName = _journalName;        return   journalName;   } } Step 2: Now Create UI Builder Class to customize the paramet...

How to Change report title in SSRS Report in D365 F&O

Image
  How to Change Report Title Based on Condition in SSRS Report in D365 F&O: Step1: Insert a new Text Box in Report Design and write Expression is the given Below: Step2: Add a DP class in Project Write a code:                                                              if (Condition)                 tmpTable.ReportTitle = "Label of title1";                 else                 tmpTable.ReportTitle = "Label of title2";      Note: this condition writes in the process report method or where your tmp table is inserted.

How to creating a new Project, Package, and Model in D365 F&O

Image
                   Creating a New Project Project  an element can be customized only once they are added to a specific Visual Studio project. The project may only belong to one model.  Model is a group of the element. Standard elements are part of a standard model; You can add them to your model and do customization. A model is a design-time concept. Package is a deployment and compilation unit of one or more models. It includes model metadata, binaries, cubes, and other associated resources. One or more D365 packages can be packaged into a deployment package, the vehicle used for deployment on UAT and production environments. Created a new project 1. Open Visual Studio as admin. 2. On the File menu, point to New, and then click Project. 3. In the list of Templeted types, expand the Installed node. 4. Select the Finance and Operation category. Enter the name of a project and solution name.