Thursday, January 18, 2018

Refresh caller datasource in the list page AX 2012


Today I am going to share with you sample code for updating the caller datasource on list page action menu item. We normally refresh the caller data source on a normal form like this way.


FormRun callerForm;

callerForm = element.args().caller();

callerForm.dataSource().refresh();
callerForm.dataSource().reread();
callerForm.dataSource().research();

In case of a list page how would you get the grid to refresh since the list page does not allow any override methods, because it uses Interaction Class. However, if I am going to use an action menu item. Code sample provided bellow is useful for this purpose.



void main(Args _args)
{

FormDataSource   callerDataSource;

callerDataSource = _args.record().dataSource();
callerDataSource.refresh();


callerDataSource.reread();
callerDataSource.research(true);
}

Integration patterns and practices



This topic is intended to help architects and developers make sound design decisions when they implement integration scenarios for Microsoft Dynamics 365 for Finance and Operations, Enterprise edition.

The topic describes integration patterns, integration scenarios, and integration solutions and best practices for Finance and Operations. However, it doesn't include technical details about how to use or set up every integration pattern. It also doesn't include sample integration code.

The following table lists the integration patterns that are available for Finance and Operations.

Pattern Documentation
OData OData
Batch data API Recurring integrations
Data management API
Custom service Custom services
Consume external web services Consuming external web services
Synchronous vs. asynchronous integration patterns
Processing can be either synchronous or asynchronous. Often, the type of processing that you must use determines the integration pattern that you choose.

A synchronous pattern is a blocking request and response pattern, where the caller is blocked until the callee has finished running and gives a response. An asynchronous pattern is a non-blocking pattern, where the caller submits the request and then continues without waiting for a response.

The following table lists the inbound integration patterns that are available.

Pattern Timing Batch
OData Synchronous No
Batch data API Asynchronous Yes
Before you compare synchronous and asynchronous patterns, you should be aware that all the REST and SOAP integration application programming interfaces (APIs) that Finance and Operations provides can be invoked either synchronously or asynchronously.

The following examples illustrate this point. You can't assume that the caller will be blocked when the Open Data Protocol (OData) is used for integration. The caller might not be blocked, depending on how a call is made.

Pattern Synchronous programming paradigm Asynchronous programming paradigm
OData DbResourceContextaveChanges DbResourceContextaveChangesAsync
Custom service httpRequestetResponse httpRequesteginGetResponse
SOAP UserSessionServiceetUserSessionInfo UserSessionServiceetUserSessionInfoAsync
Batch data API ImportFromPackage BeginInvoke
Both OData and custom services are synchronous integration patterns, because when these APIs are called, business logic is immediately run in Finance and Operations. Here are some examples:

If OData is used to insert product records, the records are immediately inserted as part of the OData call.
If a custom service is used to look up on-hand inventory, business logic is immediately run as part of the JSON/SOAP call, and an inventory sum number is immediately returned.
Batch data APIs are considered asynchronous integration patterns, because when these APIs are called, data is imported or exported in batch mode. For example, calls to the ImportFromPackage API can be synchronous. However, the API schedules a batch job to import only a specific data package. The scheduling job is quickly returned, and the work is done later in a batch job. Therefore, batch data APIs are categorized as asynchronous.

Batch data APIs are designed to handle large-volume data imports and exports. It's difficult to define what exactly qualifies as a large volume. The answer depends on the entity, and on the amount of business logic that is run during import or export. However, here is a rule of thumb: If the volume is more than a few hundred thousand records, you should use the batch data API for integrations.

In general, when you're trying to choose an integration pattern, we recommend that you consider the following questions:

Is there a business requirement that the integration should be in real time?
What is the requirement for the peak data volume?
What is the frequency?
Error handling
When you use a synchronous pattern, success or failure responses are returned to the caller. For example, when an OData call is used to insert sales orders, if a sales order line has a bad reference to a product that doesn't exist, the response that the caller receives contains an error message. The caller is responsible for handling any errors in the response.

When you use an asynchronous pattern, the caller receives an immediate response that indicates whether the scheduling call was successful. The caller is responsible for handling any errors in the response. After scheduling is done, the status of the data import or export isn't pushed to the caller. The caller must poll for the result of the corresponding import or export process, and must handle any errors accordingly.


Create and update product information
A manufacturer runs Finance and Operations, but defines and configures its product by using a third-party application that is hosted on-premises. This manufacturer wants to move its production information from the on-premises application to Finance and Operations. When a product is defined, or when it's changed in the on-premises application, the user should see the same change, in real time, in Finance and Operations.


Recommended solution
This scenario is best implemented by using the OData service endpoints to create and update product information in Finance and Operations.+

In Finance and Operations:

Determine all the entities that are required for the integration.
Make sure that the OData service endpoints are available for the same set of entities.
In the third-party application:

When product information is created or modified in the third-party application, an OData call is made to Finance and Operations to make the same change.
Read the status of customer orders
A company runs Finance and Operations but has a self-hosted customer portal where customers can check the status of their orders. Order status information is maintained in Finance and Operations.


Monday, January 8, 2018

How to get Dynamics 365 for Operations (AX 7)


 If your business demands an on-premise version, the integration of the Azure platform's connected apps listed above will not work without your data being stored in the cloud.
Updated 04/19/2017: The ERP world is changing rapidly due to to cloud implementations as there are big differences in implementing in the cloud versus on-premise; this blog "Comparison of Dynamics AX versus Dynamics 365" hopes to explain the new buying options, and terms.

How to get Dynamics 365 for Operations (AX 7)?

The new release of Dynamics 365 for Operations (AX 7) can be purchased as a stand alone product for over 20 users in the public cloud, and will be offered as both a hybrid solution in 2017 (meaning your company can use it's own data centers), or on-premise.  Dynamics 365 for operations once referred to as AX 7 is a game changer for ERP in that it can be used anytime, anywhere, on any device and it includes development space.  A package deal including CRM will soon also be available on Microsoft Azure cloud platform by subscribing to Microsoft Dynamics 365 Enterprise Edition plan 2 (more details below).

What is Microsoft Dynamics 365?


Functionality / Modules Within Dynamics 365 Enterprise
Microsoft Dynamics 365, a cloud-based application experience based on a common data model allowing Microsoft's current CRM and ERP cloud solutions to be deployed in one cloud service with new role based subscriptions.  The Dynamics 365 apps are designed so they can be easily and independently deployed. Your business can start with the apps you need, and as your business demands, you can adopt additional capabilities with ease as all the apps work together. The purpose-built apps help manage specific business functions like field service, customer service, and project service automation.  Dynamics 365 can be purchased in several ways:  the main categories include Dynamics 365 Business Edition or Dynamics 365 Enterprise Edition.

The Business Edition plan 

  • Optimized for 10-250 Employees
  • Comprises Project ‘Madeira’ & Future Sales & Marketing Solutions
  • Cloud Only
  • Max 300 seats
  • Financials (Q4 2016 U.S.A. and Canada only)
  • Sales and Marketing (future)
  • Field Service
  • Customer Service
  • Project Service Automation

Dynamics 365 Enterprise Plan 1 includes CRM and these Application Options

  • Optimized for 250+ Employees
  • Min 20 seats on select offers
  • Powerapps that use the Microsoft common data model (see below)
  • Flow (New App - see more below)
  • CRM
  • Sales
  • Field Service
  • Customer Service
  • Project Service Automation
Plan one does not include operations (aka AX 7) whereas, Dynamics 365 plan 2includes plan 1 and Operations or AX(7) and Adobe Marketing Cloud.
AX (7) will be referred to as Operations in Dynamics 365 Enterprise Edition.

The differences between Dynamics AX versus Dynamics 365

The difference of Dynamics AX versus Dynamics 365 Enterprise Edition is that your company can purchase plans and not just an on premise application. Licensing is more flexible as well.
The plans for Dynamics 365 are offered in two ways: Right now its referred to as plan 1 & plan 2.
Dynamics AX7 versus Dynamics 365 Enterprise Edition
Read more about Powerapps, Flow and release dates by reading the blog, "Dynamics AX (7) versus Dynamics 365 Enterprise Edition."
Dynamics 365 for Operations will be available to purchase on-premise starting in June 2017 and a preview will begin in April.  The special caveat to remaining on premise is as follows:  The on-premise data will not  benefit from Microsoft's intelligence capabilities of embedded analytics, machine learning, or other capabilities available to cloud subscribers.
At Clients First Business Solutions, we are a Microsoft Gold Partner with a team of tenured specialists with core competencies in the implementation and support of Microsoft Dynamics AX.  In fact we have over 180 years combined experience in Dynamics AX.  To explore all the capabilities of Dynamics AX and find out how this business solution can help your manufacturing or MRO organization achieve its full potential, contact our sales team at 800.331.8382 or email sales@clientsfirst-tx.com.   Our Clients First Texas and Minnesota offices offer Dynamics AX ERP to the medium to large manufacturer and MRO across the United States and in 11 countries and counting.   Call us today to see how Dynamics AX can transform your business.