Latest Microsoft Dynamics 365 Blogs | CloudFronts - Page 168

Global AIF Setting without which AIF Services will Not Work in AX 2012 R2

Posted On May 28, 2015 by Posted in

1. Go to AOT. 2. There is a Form called “AifGlobalSettings”. 3. Right Click & Open the form [Refer to the below snapshot of the form] 4. There is a check box called “Enable Runtime Caching”. 5. Make sure the check box is checked else the AIF services will NOT be accessible from outside.

Share Story :

Enhanced Update Request in CRM 2015 Update 1

Posted On May 28, 2015 by Posted in

Before release of CRM 2015 Update 1, user needs to call different request to perform the below operation. 1. If user wants to update the records he needs to call the UpdateRequest 2. If User wants to Change the Status of record he needs to call the SetStateRequest. 3. If a user wants to change the ownership of the records then also he needs to perform the AssignRequest. 4. Similarly user needs to call below request to perform the below operation So, if user needs to perform below operation on a record, a: Update b: Assign c: Status Then user needs to call three different request which hits the server thrice and if there are so many records then it will increase the load. But in this release there is good news for the developer, now user can perform all the above operation in a single request. User just needs to call the UpdateRequest to perform all the above listed operation. Notes: For Microsoft Dynamics CRM Online organizations, this feature is available only if your organization has updated to Dynamics CRM Online 2015 Update 1. This feature is not available for Dynamics CRM (on-premises). Though above listed messages have been deprecated for future releases, it will continue to be available with the 2011 endpoint. However, the recommendation is to use the UpdateRequest or Update method when possible to set these attributes. You can continue to use these specialized messages of the 2011 endpoint in your code. However, the Web API that eventually replaces the 2011 endpoint supports only the Update message for these types of operations. If you want to get a head start on changing your code to align with the Web API, you can now do so. See Web API Preview for more information. Following are the impacts on the Plug-ins and workflows Plugin: When update requests are processed that include both owner fields plus other standard, plug-ins registered for the Update message in pipeline stage 20 and/or stage 40 execute once for all non-owner fields, and then once for the owner fields. The new API would not execute the SetState or Assign message plugin, BUT, it will call an UPDATE request for each of these messages a. 1st time for the updating-This time, the target would receive only the non-owner/non-status fields) b. 2nd time for the Owner-only the owner field is available in Target c. 3rd time for the state-This time only status fields are passed in Target. In order for plug-in code to receive the full data changes of the update, you must register the plug-in in stage 10 and then store relevant information in SharedVariables in the plug-in context for later plug-ins (in the pipeline) to consume. Workflow: a. When update requests are processed that include both owner fields plus other standard fields, workflows registered for the Update message execute once for all non-owner fields, and then once for the owner fields. Workflows registered for th Assign message by users continue to be triggered by updates to owner fields. b. When update requests are processed that include both state/status fields plus other standard fields, workflows registered for the Update message execute once for all non-state/status fields, and then once for the state/status fields. Workflows registered for the Change Status step continue to be triggered by updates to state/status fields.

Share Story :

Configure Inbound Port in AX 2012 to handle Bigger size XML coming inside via AIF

Posted On May 28, 2015 by Posted in

1. The maximum size of the XML message that AX can receive is 64kb. In order to accept the XML of bigger size, we have to configure the Inbound port.   2. The web.config is created from the configuration of the inbound port. So, in order to preserve the changes even if the Inbound port gets reactivated, please make the changes as detailed below [Please refer to the below snapshots for your information] a. Go to the Inbound port. b. De-Activate the inbound port. c. Click on “Configure” button as shown below [A pop up window will come] d. Click “Yes” on the window popped up[Find below the snapshot of the popped up window] e. Now go to Bindings basicHttpBindingWithWindowsAuth as highlighted in the below snapshot. f. Now set the size of the property “MaxReceivedMessageSize” to a bigger value(like: 10485760). g. Save the changes and close the form. h. Click on Activate button to activate the Inbound port. i. Check the Web Config file from the above file location and verify the value that was set in the previous “step-f”. X++ code to fetch the data from Excel in AX 2012R2 I have come across the requirement to fetch the data from Excel in AX. Below is the X++ code to do the same: static void ImportDataFromExcel(Args _args) {     SysExcelApplication application;     SysExcelWorkbooks workbooks;     SysExcelWorkbook workbook;     SysExcelWorksheets worksheets;     SysExcelWorksheet worksheet;     SysExcelCells cells;     COMVariantType type;     int row;     ItemId itemid;     Name name;     FilenameOpen                    filename;     dialogField                     dialogFilename;     Dialog                          dialog;     ;     #AviFiles     #Excel     application = SysExcelApplication::construct();     workbooks = application.workbooks();       dialog = new Dialog(“ExcelUpload”);     dialogFilename      =   dialog.addField(extendedTypeStr(FilenameOpen));     dialog.filenameLookupFilter([“@SYS28576”,#XLS, “@SYS28576”,#XLSX]);     dialog.filenameLookupTitle(“Upload from Excel”);     dialog.caption(“Excel Upload”);     dialogFilename.value(filename);     if(!dialog.run())         return;     filename            =   dialogFilename.value();     application         =   SysExcelApplication::construct();     workbooks           =   application.workbooks();     try     {     workbooks.open(filename);     }     catch (Exception::Error)     {     throw error(“File cannot be opened.”);     }     workbook = workbooks.item(1);     worksheets = workbook.worksheets();     worksheet = worksheets.itemFromNum(1);     cells = worksheet.cells();    do { row++; itemId = cells.item(row, 1).value().bStr(); type = cells.item(row, 1).value().variantType(); info(strfmt(‘%1’, itemId)); } while (type != COMVariantType::VT_EMPTY); }

Share Story :

Creating Sales Order with address in AX 2012 R2 via AIF through .Net

Posted On May 28, 2015 by Posted in

Creating Sales Order with address information in AX 2012R2CU7 via AIF through .Net Code Please see the below .net code static void Main(string[] args)         {             // Instantiate an instance of the service client class.             SalesOrderServiceClient proxy = new SalesOrderServiceClient();               // Create an instance of the document class.             AxdSalesOrder salesOrder = new AxdSalesOrder();               // Create instances of the entities that are used in the service and             // set the needed fields on those entities.             AxdEntity_SalesTable salesTable = new AxdEntity_SalesTable();             salesTable.CurrencyCode = “USD”;             salesTable.CustAccount = “C846456”;             salesTable.ReceiptDateRequested = Convert.ToDateTime(“4/21/2015”);             salesTable.Payment = “PP”;             AxdEntityKey_LogisticsPostalAddress LPA = new AxdEntityKey_LogisticsPostalAddress();             LPA.Location_LocationId = “5637282089”;               AxdExtType_EffectiveDateTime date = new AxdExtType_EffectiveDateTime();             date.timezone = AxdEnum_Timezone.GMT_COORDINATEDUNIVERSALTIME;             DateTime dateValue = new DateTime(2015, 4, 29, 14, 10, 53, 001, DateTimeKind.Utc);               date.timezoneSpecified = false;             date.localDateTimeSpecified = false;             date.Value = dateValue;              LPA.ValidFrom = date;              salesTable.DeliveryPostalAddress = LPA;               AxdEntity_SalesLine salesLine = new AxdEntity_SalesLine();             salesLine.ItemId = “10-009”;             salesLine.SalesQty = 9;             salesLine.SalesUnit = “ea”;               CallContext callContext = new CallContext();             callContext.Language = “en-us”;             callContext.Company = “KTEC”;             salesTable.SalesLine = new AxdEntity_SalesLine[1] { salesLine };             salesOrder.SalesTable = new AxdEntity_SalesTable[1] { salesTable };               try             {                 // Call the create method on the service passing in the document.                 EntityKey[] returnedSalesOrderEntityKey = proxy.create(callContext,salesOrder);                   // The create method returns an EntityKey which contains the ID of the sales order.                 EntityKey returnedSalesOrder = (EntityKey)returnedSalesOrderEntityKey.GetValue(0);                 Console.WriteLine(“The sales order created has a Sales ID of ” + returnedSalesOrder.KeyData[0].Value);                 Console.ReadLine();             }             catch (Exception e)             {                 Console.WriteLine(e.ToString());                 Console.ReadLine();             }         } Error Details in AX exceptionlog : “The value in field DeliveryPostalAddress is invalid.”

Share Story :

What’s New in Power BI?

Posted On May 28, 2015 by Posted in

Key Technologies: Microsoft Business Intelligence, Power BI Note: This article assumes experience on Power BI for Office 365 using Excel 2013 and the Microsoft BI stack Power BI transforms data into rich visualizations independent of Office 365 and SharePoint Online. Newly available features: Powerful Dashboards using HTML5 without the need to install Silverlight New Visualizations =:Combo Charts =:Filled maps =:Radial gauges Support for popular SaaS Microsoft Dynamics CRM Online Salesforce Zendesk Marketo SendGrid GitHub Connectivity to on premise SQL Server Analysis services tabular models Available for iPhone, iPad & Windows tablet Q&A using Natural Language Processing Power BI Designer Tool Power BI Designer puts visual analytics at your fingertips with intuitive report authoring Drag-and-drop to place content exactly where you want it on the flexible and fluid Designer canvas Quickly discover patterns as you explore a single unified view of linked, interactive visualizations Includes data import using “Get Data”, Data modelling using “Manage” and creating reports using “Report” With “Get Data” option we can import data from different sources such as databases, web pages, data files like text, csv, xml, etc. Click on “Manage” to create relationships between different tables Create reports using different visualizations available Save the file and upload it to www.powerbi.com

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange