Latest Microsoft Dynamics 365 Blogs | CloudFronts - Page 3

Error ‘An error occurred during report data sets execution’ in D365 Operations

Introduction: In this blog article, we will see how to resolve timeout error in D365 Operations. Refer below screenshot for error. This error occurs when a report is processing many records and takes too long to execute. A report processing times out in 10 minutes. Steps: To resolve the error, follow below steps, Go to Tmp Table and change its Table Type property to TempDB. Go to RDP class and extend the class from SrsReportDataProviderPreProcessTempDB Save, Build and Deploy the Report.

Share Story :

OData API – Exposing Data Entities in D3FOE (Part 1)

Introduction: In this blog article, we will see how we can expose standard and custom data entities using OData Client code generator to OData API for CRUD operations. Steps: Install OData Client Code Generator v4 Create new Project Execute the OData Client code. 1. Install OData Client Code Generator v4: Open Visual Studio. Go to Tools -> Extensions and Updates Go to Online Fast Tab -> Visual Studio Gallery -> Type ‘OData V4 Client Code Generator’ Click Download. In the VSIX Installer dialog box, Click Install. After Installation, it will ask you to restart the Visual Studio. Click Restart now. 2. Create new Project: Click on new Project. Go to Visual C# -> Windows -> Select Console ApplicationNote: Client Code Generator can work with any project. Enter details and click OK. 3. Execute the OData Client code: In Solution Explorer, right click the solution. Go to Add -> New Item. Select OData Client. Click Add. You will see 2 files added in the solution. Open the file with .tt extension (Text Template). In the file, update the Metadata URI. Save and execute the .tt file. You can see a .cs file generated under the .tt file. Conclusion: This will generate a code that exposes all the Data Entities of D365 Operations. You can use this generated code for CRUD operations. In the next part, we will see how to use this generated code to read and write data in tables using exposed data entities.

Share Story :

Invoking Web Service/Rest API from D365 FOE

In this blog article, we will see how we can invoke web service call for a third-party application in Dynamics 365 for Finance and Operations, Enterprise Edition using X++. In this blog we will Consider Service Order Entity as source passing Service Order values to a third party application on Service Order creation using web service endpoint url. Create a SMAServiceOrderTable Table post Insert event. /// <summary> /// Post insert passing Service Order values and URL to invoke Web service /// </summary> /// <param name=”sender”></param> /// <param name=”e”></param> [DataEventHandler(tableStr(SMAServiceOrderTable), DataEventType::Inserted)] public static void SMAServiceOrderTable_onInserted(Common sender, DataEventArgs e) {         SMAServiceOrderTable serviceOrderTable;         serviceOrdertable = sender as SMAServiceOrderTable;         String15 SOstatus = enum2Str(serviceOrderTable.Progress);                 //parmvalue stores Service Order values in container   container parmvalue = [“‘CustAccount’:'”+serviceOrderTable.CustAccount+”‘”,”‘ServiceOrderId’:'”+serviceOrderTable.ServiceOrderId+”‘”,”‘CurrencyCode’:’US Dollar'”,”‘SOStatus’:'”+SOstatus+”‘”,”‘ProjId’:'”+serviceOrderTable.ProjId+”‘”,”‘CFSCRMWorkOrderNo’:'”+serviceOrderTable.CFSCRMWorkOrderNo+”‘”]; new WebService().sendrecord(“<<webservice url>>”,parmvalue); } Create a class which calls the web service. Class WebService { public void sendrecord(String255 endpointurl,container arryI)     {         str                             url;         str                             postData;         str                             returnValue;         System.Net.HttpWebRequest       request;         System.Net.HttpWebResponse      response;         System.Byte[]                   byteArray;         System.IO.Stream                dataStream;         System.IO.StreamReader          streamReader;         System.Net.ServicePoint         servicePoint;         System.Net.ServicePointManager  servicePointManager;         CLRObject                       clrObj;         System.Text.Encoding            utf8;         Counter  countCounter;         ;         //generate postdata in json format         postData = “{“;         for(countCounter= 1;countCounter<= conlen(arryI);countCounter++)         {             postData = postData+conpeek(arryI,countCounter)+”,”;                    info(strFmt(“%1″,postData));         }         postData = postData+”}”;                new InteropPermission(InteropKind::ClrInterop).assert();         url = endpointurl;         clrObj = System.Net.WebRequest::Create(url);    System.Net.ServicePointManager::set_Expect100Continue(false);         request = clrObj;         request.set_Method(“POST”);         utf8 = System.Text.Encoding::get_UTF8();         byteArray = utf8.GetBytes(postData);         request.set_ContentType(“application/json”);        request.set_ContentLength(byteArray.get_Length());         dataStream = request.GetRequestStream();         dataStream.Write(byteArray, 0, byteArray.get_Length());         dataStream.Close(); } } Let me know your reviews. I will soon come up with more articles, as I further explore D365 Operations.

Share Story :

Form Personalization in D365 Operations

In AX 2012, we had an option Personalize to view the form and form control layout; Form, DataSource and field details; Add and manage form design. In this blog article, we will see how we can find form and form control details in Dynamics 365 for Operations. In this blog we will view the Customer Name – form control details. 1. Go to Accounts Receivable -> All customers -> Right click on the ‘Name’ field. 2. Select Form Information -> Form Name 3. In Form Information go to Administration Fast Tab. You can find all details regarding form control – Customer name.

Share Story :

Override Form DataSource method using Extensions in D3fO

In this blog article, we will see how we can override Form Data source method using Extensions in Dynamics 365 Operations. Now as recommended by Microsoft we must avoid Overlayering and instead use Extension. For extension, we have to use pre or post event handlers methods. In this blog we will create event handler of OnActivated() method of SalesLine DataSource of form SalesTable. Create a new Class: class CFSActivateButton {    } Copy and paste OnActivated() event handler of SalesTable DataSource in Class:   /// <summary> /// To activate or deactivate Create Service Order button based on CFSProjId field of SalesLine /// </summary> /// <param name=”sender”></param> /// <param name=”e”></param> [FormDataSourceEventHandler(formDataSourceStr(SalesTable, SalesLine), FormDataSourceEventType::Activated)] public static void SalesLine_OnActivated(FormDataSource sender, FormDataSourceEventArgs e) {              FormDataSource      fds = sender.formRun().dataSource(“SalesLine”);         SalesLine           salesline = fds.cursor();         FormRun             fr = sender.formRun();         FormControl         fc = fr.design(0).controlName(“CreateServiceOrder”);                if(salesLine.ProjID)         {             fc.enabled(true);         }         else         {             fc.enabled(false);         }     }  

Share Story :

Open URL in Web browser from D3fO using X++

In this blog article, we will see how we can open a URL in web browser from D3fO using X++ code. It is achieved using Browser class which extends System Class xBrowser having only method navigate(). It has three parameters from which only first is mandatory: downloadURL (string) – URL you want to browse. openInNewTab (Boolean) – It is used to specify url should be open in same tab or new tab showExitWarning (Boolean) – Prompt a dialog to exit the current page. Create a new Class: class CFSBrowseURL { } Call URL: public static void main(Args _args) { Browser browser = new Browser(); browser.navigate(‘www.cloudfronts.com’, true, false); } So, this will open URL within a new tab in browser using X++. Let me know your reviews and queries. I will soon come up with more articles, as I further explore D365 Operations.

Share Story :

Sales Order Line error – Cannot create a record in order line. Record already exist

Introduction In this blog article, we will see how to resolve the below error while creating a record in Sales Line in AX 2012. Solution: This error causes because Sales Line has a primary index set as InventTransId and the value for it is not being generated while inserting a new record in Salesline. 1. Go to Inventory Management -> Setup -> Inventory Management Parameters -> Go to Number Sequence tab 2. Select Lot Id -> Right click -> Select View Details 3. In the General Tab -> Uncheck the manual checkbox.   OR   This error can also be caused because there exist unused Number Sequence list. 1. Go to Accounts Receivable -> Setup -> Accounts Receivable Parameters -> Go to Number Sequence Tab 2. Select Sales order -> Right click -> Select View Details 3. On Action Pane Select Manual Clean up -> Select current Tab. 4. On Number Sequence Form -> Select Cleanup 5. Click OK.

Share Story :

Model Import/Export in Dynamics 365 Operations

In this blog article, we will see how we can export model in a model file, then import model file in development environment and delete existing model in development environment. Prerequisites: D3fO Environments. Steps: Export Model in a Model File. Import Model File. Resolve Conflicts. Build and Synchronize Model. Export Model To export a model in a model file, use the ModelUtil.exe tool which is located in j:\AOSService\PackagesLocalDirectory\Bin and the -export directive. ModelUtil.exe -export -metadatastorepath= [path of the metadata store] -modelname=[name of the model to export] -outputpath=[path of folder where model file should be saved] Example: Import Model To install a model file in development Environment, use the ModelUtil.exe tool and the -import directive. ModelUtil.exe -import -metadatastorepath=[path of the metadata store where model should be imported] -file=[full path of the file to import] Example: If the model already exists in Development Environment, then first delete the model using ModelUtil.exe tool and -delete directive. ModelUtil.exe -delete -metadatastorepath=[path of the metadata store] -modelname=[name of the model to delete] Example: Resolve Conflicts If the model you installed has customizations in higher layer, you need to resolve code or metadata conflicts. Under Dynamics 365 -> Addins -> select Create Project from Conflicts. In dialog box, select the model you installed, to check for conflicts. Click Create Project. New Project is created with elements having conflicts. Resolve the conflicts. Build and Synchronize Build the Model and Synchronize the Database.

Share Story :

Deploy Dynamics 365 Operations Environment using LCS

In this blog article, we will see how we can create a Project and Deploy a Dynamics 365 Operations Environment using Microsoft Dynamics Lifecycle Services. Prerequisites: Lifecycle Service Account Azure Subscription Steps: Create a new project in Lifecycle Service Account. Azure Settings Deploy Environment. Create New project in Lifecycle Services Navigate to https://lcs.dynamics.com/Logon/Index Click Sign in. Loginwith the account you used to subscribe. Click the + icon to create a new project. Select the project type- “Migrate, create solutions and learn Dynamics 365 for operations”. See below screenshot for reference. Enter the project information and then clickCreate. Azure Settings: Follow this link to setup your Azure connector settings, https://ax.help.dynamics.com/en/wiki/arm-onboarding/ Deploy Environments: In newly created Project, go to Environmentssection, click the plus sign (+). Refer screenshot below You can click either the Downloadlink to download the VHD or Next to deploy on Azure. Azure is the preferred path. Enter the environment name. Read the terms, and then select the check box to indicate you understand them. Click Next. Confirm the details, and then click Deploy. So, this will deploy the D365 Operations Environment. Let me know your reviews. I will soon come up with more articles, as I further explore D365 Operations.  

Share Story :

Customization in Microsoft Dynamics AX 7

In past few days, we have explored more about AX 7 and came up with this blog in which we will tell you how to customize standard element in AX 7. In previous versions of AX customizing was as easy as clicking on standard element of AOT and customizing it. AX 7 is different; it allows customization in a lengthy process but is more organized. We will show you steps through which you can easily customize AX 7 elements. Here, we will customize CustTable Table by adding new field. Create a model in which you can customize CustTable element. Go to Dynamics AX menu -> Model Management -> Create Model   Fill the details and click Next.   Select ‘Select Existing Package’ option. Choose the package which contains the element you want to customize. Click Next.   Verify details. Click Finish.   This will open a new project dialog. Select ‘Dynamics AX Project’ and name it.   Now, add the CustTable to newly created project. Go to AOT -> Data Model -> Tables -> CustTable Right click CustTable -> Select Customize   CustTable will be added to project and will open Designer view of CustTable.   Add new field. Right Click on Field -> New -> String   Change the Properties.   Save the changes. Right Click CustTable object browser -> Select ‘Save CustTable’.   So, this is how we can customize AX 7 elements in a more organized manner. Let us know your reviews. We will soon come with more articles, as we further explore AX 7.  

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange