martes, 26 de mayo de 2015

Utilizando el Javascript en los Subgrids

El Update 1 de Dynamics CRM 2015 disponible solamente para online, tiene muchas mejoras en la SDK. Este tipo de mejoras son muy agradecidas por nosotros los desarrolladores, que nos aportan nueva y potentes funcionalidades que ofrecer a nuestros clientes.

Una de las mejoras que considero muy importantes, que no han sido muy publicadas, son las de las mejoras en código Javascript con el trabajo con los Subgrids.

Los Subgrids, son vistas que se pueden añadir en los formularios de CRM, por ejemplo para ver las actividades, contactos, o cualquier entidad relacionada de un registro.

Básicamente la idea es poder acceder a los Subgrids por código, y trabajar con el mismo, además de poder añadir código en el evento “OnLoad” de los Subgris (que se cargan de forma asíncrona).

El modelo de objetos de Javascript es el siguiente:


Aquí os dejo un pequeño (muy pequeño) código Javascript en donde he probado algunas de estas nuevas funcionalidades;
   1:  var onLoadSubGrid = function () { 
   2:      alert("Load subGrid");
   3:  };
   4:   
   5:  function onLoadForm()
   6:  {
   7:      var contactsSubgrid = Xrm.Page.getControl("Contacts");
   8:      contactsSubgrid.addOnLoad(onLoadSubGrid);
   9:  }
  10:   
  11:  function onChange()
  12:  {
  13:      var contactsSubgrid = Xrm.Page.getControl("Contacts");
  14:      alert ("Total de contactos: "+contactsSubgrid.getGrid().getTotalRecordCount());
  15:  }

  
Finalmente, lo que podemos hacer ahora es:
  • Acceder al Grid para ver la vista seleccionada, añadir eventos en el load, etc.
  • Acceder a los elementos de la vista, cuantos registros hay, cuales están seleccionados, etc
  • Acceder a los datos de los subgrids (GridEntity) con los campos entityType, id y name
  • Cambiar las vistas seleccionadas
El artículo de la SDK que ofrece mas detalles de estas mejoras está aquí: https://msdn.microsoft.com/en-us/library/dn932137.aspx y aquí con mas detalle: https://msdn.microsoft.com/en-us/library/dn932126.aspx
@demian_rasko

sábado, 16 de mayo de 2015

Como configurar Parature KB en Dynamics CRM Update 1

Dynamics CRM o la familia de Dynamics CRM sigue creciendo. Muchos ya conocen Dynamics Marketing o Social Engagement, pero también hay otro producto llamada Parature, que es una solución global enfocada al servicio al cliente.

Esta solución, está cada vez mas integrada con Dynamics CRM, y de hecho el Update 1 (solo online de momento), permite la integración de la KB de Parature, dentro de los formularios de CRM.

Hoy voy a explicar paso a paso como configurar y utilizar esta integración.

Lo primero que hay que hacer es configurar Parature dentro de Dynamics CRM en la zona de Administración de servicios:

image 

Y luego abre esta pantalla:

image

Allí debemos seleccionar:

  • Instancia de Parature (debe estar en la misma instancia de Office365)
  • Id del departamento
  • Dirección URL del portal

Para recoger el Id del departamento, debemos ir a Parature y copiar el número que pongo a continuación:

image

Y para la URL del portal la que enseño a continuación:

image

Luego de haber rellenado esos dos valores, damos a siguiente y nos aparecerá lo siguiente:

image

Luego vamos a crear un artículo nuevo en la KB de Parature:

image

image

La enviamos para revisión:

image

Y la aprobamos y publicamos:

image

Una vez aprobado el artículo, ya podemos crear casos en CRM y en el “Panel social” tener acceso al mismo:

image

Si hacemos click sobre el título, podemos previsualizar el artículo:

image

O en una ventana emergente:

image

Además podemos enlazar en artículo con el caso:

image

Los artículos relacionados aparecen aquí:

image

Mediante esta configuración tan sencilla nos permite añadir los artículos de KB de Parature dentro de CRM, con toda la potencia y versatilidad que da Parature, y con toda la trazabilidad y seguimiento que puede darnos Dynamics CRM.

Espero les haya gustado.

@demian_rasko

lunes, 11 de mayo de 2015

Como saber la edad de un Contacto con un Campo Calculado

Hoy vamos a usar los campos Calculados para determinar la edad de un contacto.

La idea es simple…desde una fecha de nacimiento, quiero tener un campo que vaya cambiando año tras año, diciéndome la edad del Contacto.

Antiguamente si nos enfrentábamos ante un desafío de esta envergadura, solo nos quedaba la opción de ponernos a desarrollar plugins, servicios externos, etc. para ir actualizando estos datos.

Hoy en día, podemos hacer estas cosas de forma mucho mas sencilla, simplemente utilizando funcionalidades nuevas de los campos calculados del Update 1 (solo para CRM Online).

La idea es simple, primero creamos un campo Edad en el contacto, de tipo entero y calculado:

image

En la regla del cálculo ponemos algo tan simple como: “DIFFINYEARS(birthdate,NOW())” pero lo que obtenemos es un error:

image

Por que? solamente queremos sacar la diferencia en años (nueva función de Update1) entre el birthdate y ahora (Now). Esto ocurre porque los formatos de ambos campos es diferente. la función “Now()” devuelve un campo con formato Fecha/Hora, y el Birthdate es solo fecha.

Entonces, se me ocurre ir al campo “birthdate” y cambiarle el formato. Pero resulta que no se puede cambiar el formato:

image

Entonces me creo un campo nuevo de formato Fecha y hora:

image

Vuelvo al campo calculado que se llama “Edad” y ahora:

image

Y lo añado en el formulario y ya lo tenemos:

image

Este campo ya lo podemos utilizar en vistas por ejemplo:

image

Espero les haya gustado!

@demian_rasko

martes, 28 de abril de 2015

Integración con OneNote con CRM 2015 Update 1

Unos de las nuevas funcionalidades que mas interés está levantando del Update 1 que viene en estos días, es la integración con OneNote.

Esta integración permite crear Blocs de OneNote Online, relacionado con registros de CRM (Cuentas, Contactos, etc.).

Para habilitar esta integración, lo primero que hay que hacer es habilitar la integración con Sharepoint del lado servidor, y luego habilitar que entidades queremos que puedan tener OneNote:

image

image

Una vez configurado, podremos utilizar el OneNote en el cliente de tablets o “moca” como se muestra a continuación. La primera vez que se accede a un registro, y aún no se ha creado el bloc de notas, aparece un mensaje como el siguiente:

image

El bloc de notas de un registro, se crea en el momento que se accede desde el cliente web al registro, y se seleciona OneNote desde la pestaña del panel social del registro:

image

Una vez creado, podemos ir al moca de nuevo y poder editar allí las notas:

image

Editamos las notas, y ya está.

image

Desde OneNote podemos añadir dibujos, imágenes o fotos con la cámara, entre otras muchas funcionalidades que nos da OneNote.

El bloc de notas esta almacenado en SharePoint Online, y queda relacionado con el registro de CRM, que se podrá acceder también desde el cliente web, en el formulario en el panel social.

Espero les haya gustado esta integración.

un saludo

@demian_rasko

viernes, 24 de abril de 2015

Utilización del “Update” para mensajes especiales con CRM 2015 Update 1

Hoy seguimos con temas nuevas en la nueva versión Update 1.

Esta es una de las versiones de Dynamics CRM con la que estoy mas entusiasmado, debido a todos los cambios en la SDK que nos permiten mejorar (y mucho) nuestros desarrollos.

Una de las nuevas funcionalidades de esta SDK, es las posibilidad de asignar registros y cambiar sus estados simplemente utilizando el método “Update”.

Antiguamente (hasta CRM 2015 o versión 7.0) para asignar un registro o actualizar un estado del mismo, se debían llamar a mensajes específicos para esto por ejemplo:

image

El tema es que si queríamos actualizar un registro y luego asignarlo y cambiarle un estado, debíamos hacer 3 llamadas al CRM (Update, Assign y SetState). Si intentabamos actualizar los campos de estado (statecode o statuscode)  o el del propietario (ownerid) simplemente no hacía nada, ni devolvía ningún error.

Con el nuevo Update 1 de CRM 2015, por fin podemos hacer asignaciones o cambios de estado, solamente con el método “Update”, lo que nos permite en una misma petición hacer lo que antes debíamos hacer en 3. Un ejemplo es lo que muestro a continuación:

image 

Este tipo de funcionalidades es clave de cara a minimizar las llamadas a web services de CRM, optimizar el código y reducir los tiempos de latencia al servidor (sobre todo para Online).

En relación con los mensajes que se disparan como mensajes de los Plugins se puede ver a continuación como cambian los mismos con este nuevo enfoque:

image

Si se llama al Assign, se dispara el Assign y el Update. Si se llama el Update, solamente se dispara ese mensaje.

espero les guste este análisis y puede serles útil.

un saludo

@demian_rasko

martes, 21 de abril de 2015

Nuevo libro CRM field Guide publicado

The CRM Field Guide
En los últimos meses, he tenido el placer de participar junto a un enorme grupo de MVPs de CRM, en la escritura de un libro en común.
Gracias a la organización de Julie Yack y su equipo, han conseguido coordinar a todos para conseguir un excelente libro final.
El libro de llama CRM Field Guide y esta disponible aquí: http://www.crmfieldguide.com/
El listado de los autores es el siguiente: Joel Lindstrom Feridun Kadir David Yack Carsten Groth Scott Sewell Larry Lentz Jukka Niiranen Jakub Skalbania Leon Tribe Rhett Clinton Ramon Tebar Giorgio Garcia-Agreda George Doubinski Roberto Nocera Jason Lattimer Mark Smith David Berry Demian Raschkovan Gus Gonzalez Gustaf Westerlund Dylan Haskins Jerry Weinstock Julie Yack
Y la descripción de todos los capítulos es la siguiente (personalmente, he escrito el capítulo 21, relacionado con Data Management):

Chapter 1 - Hello, I’m CRM 2013


Microsoft Dynamics CRM 2013 represents a major upgrade and in this chapter we will explore some of the new features at a high level. For many of these features this chapter will simply set the stage for a much more detailed discussion later in the book where full chapters will be dedicated to a much deeper take on that feature.
Chapter 2 - Building the Foundation
There are a few common things across Dynamics CRM and some basic architecture to follow. All of this is explained in much greater detail throughout the course of this book, but this chapter is here for some base knowledge for reference. It is important to know what CRM can do right out of the box before you head off changing it, so let’s get a firm foundation.
Chapter 3 - Marketing Automation Best Practices
This chapter takes you through the process of creation and management of Marketing Campaigns and their components. Included are Marketing Lists, both Static and Dynamic, Quick Campaigns, Marketing Campaigns, and Tracking Responses. Sales Literature, Planning Tasks, Financials, Campaign Activities, and linking to Products in the Product Catalog, all parts of Marketing Campaigns, are covered as well.
Chapter 4 - Sales Automation
Sales Automation is a methodology that automates sales business tasks such as lead management, account and contact management, knowledge sharing, order processing and tracking, customer management, sales forecast analysis, and employee goals. Microsoft Dynamics CRM 2013 offers a lot of features out-of-the-box that already include a full sales-force-automation process that could be extended through simple and complex customizations.
Chapter 5 - Service Management
This chapter describes the out-of-the-box functionality provided by Microsoft Dynamics CRM 2013 for managing service. Service functionality falls into two broad areas, tracking customer issues, complaints or other requests for service and scheduling for managing customer appointments. All of the entities related to service management are described as well as how they are connected along with examples of usage. These include case, contract, subject, article, service, service activity, facility/equipment, resource group, site, user, queue, article template, contract template, and business closure records. After reading this chapter you should have a good understanding of the service management capabilities and whether it is a good fit for your organization’s needs. You should be in a good position to decide whether you need to invest in customization or development to extend the features for your requirements or if the out of the box functionality is sufficient.
Chapter 6 - Service Management Leo
This chapter explores The “Leo” release of Microsoft Dynamics CRM 2013 (Microsoft Dynamics CRM 2013 SP1 for on-premises and Microsoft Dynamics CRM Online Spring ’14 for online) which adds new customer service features that considerably extend the capabilities of service management.
Chapter 7 - Extending Service Scheduling
Consider you are working in a company where both mobile as well as desktop users are using Microsoft Dynamics CRM. You are expecting a modern, agile and flexible concept of working hours as well as service scheduling feature. That is what this chapter is all about. Find concepts and strategies for extending the out-of-the-box feature “working hours” and turn it from a static into a dynamic model you can use in your daily business – working in your office as well as being a mobile worker communicating and interacting with your office.
Chapter 8 - Building Process Flows
They are manual, nearly impossible to script and difficult to control in code. And yet business process flows are winning the minds of customizers and developers alike. Maps, guidelines, blueprints, visualizations – call them what you please; they take a swing at traditional data-centric CRM design and focus on outcomes rather than transactions. Learn how to build business process flow across multiple entities and how to use multiple business process flows per entity, as well as how to manipulate flows programmatically, how to secure and add additional flexibility to them with roles; how to package and export for re-use.
Chapter 9 - Customizing Entities and Forms
This chapter covers the new customization options available in Dynamics CRM 2013. CRM 2013 radically changes the customization options available to the system customizer. The user interface is flatter, with menus and navigation bars hidden by default, resulting in significantly greater amounts of form real estate. To optimize the user experience, the system customizer must know how to take advantage of the new form layouts and use the new form controls, like Business Process Flow, combined address control, and the activity/notes pane.
Chapter 10 - JavaScript for the BA
Out-of-the-box Dynamics CRM 2013 gives users more ways to view and change data than ever before. Even with all the existing tools like quick view forms, workflows and portable business logic you still might find instances where you need a little something more to get the job done. Client side scripting can work wonders but isn’t always the best solution depending on the circumstances. It can be even more confusing to those CRM administrators who don’t write code for a living. The goal of this chapter is to provide some background on appropriate use of JavaScript along with some syntax and troubleshooting fundamentals while wrapping up with some real world examples.
Chapter 11 - Designing a Great User Experience
Customizing CRM is not just about adding entities and fields or developing new technical features for the system. In order to drive user adoption for CRM it is crucial to pay close attention to how the users will interact with the system, what information is presented to them and how they can be guided through the processes that are to be managed via the CRM system. This chapter explores the key components of Dynamics CRM that are available to the system customizer and provides practical guidance on how to best leverage them for designing a frictionless user experience - without writing a single line of custom code.
Chapter 12 - Display Your Data
One of the main goals of a CRM system is collect data but more important is how you can read and analyze that data. This chapter gives some basis on how to communicate data in a visual way with Dynamics CRM. It starts from the standard capabilities for dashboarding and reporting then moves on to exploring advanced topics with Power View and Power Pivot and discusses concepts of data warehousing. This chapter is a guide for the reader from basics to much more complicated examples.
Chapter 13 - Report Development
Reporting and visualization of data within CRM is crucial to give users tools to view and understand data from within CRM. This chapter identifies the various tools available within CRM for reporting as a context for understanding where custom reporting using SSIS provides unique value. The majority of the focus is on setting up and building your first SSIS – both as an on-premise CRM user with access to CRM’s SQL database and the filtered views or as a CRM Online user developing reports using CRM’s native data query language, FetchXML. The chapter wraps up with deploying the report and a discussion on security – along with simple enhancements that allow your report to work with Advanced Find and hyperlinks to make it interactive.
Chapter 14 - Social CRM
This chapter address the differences between internal and external social and the role that Yammer plays in addressing the internal social of an organization. It answers the question, “what is Yammer?” and the elements that are included in the application. Step by step setup and configuration of Yammer and Dynamics CRM is covered as well as the setting up of “rules” and how they work with auto posting. The chapter then moves on to using Yammer with Dynamics CRM 2013 and gives examples of its application across department. It stress the importance of company culture with the implementation of Yammer in an organization. The chapter concludes with a list of resources in the SDK and also a code example of embedding external Yammer feeds into a CRM dashboard.
Chapter 15 - CRM Server Optimization and Maintenance
This chapter covers a wide range of optimization, maintenance and monitoring topics that should help you towards understanding the scope of managing a Dynamics CRM infrastructure, as well as its related technologies such as Microsoft SQL Server and Internet Information Services (IIS).
Chapter 16 - Upgrade 2011 to 2013
In this chapter we explore upgrading to Dynamics CRM 2013 from an earlier version. CRM 2013 is a major upgrade, and we cover what you need to do to upgrade your configuration to take advantage of new functionality, and how to make your upgrade as painless as possible.
Chapter 17 - Security Model
Today’s global business challenges the traditional organization structure as people form dynamic teams to work on individual opportunities or other data in CRM. Securing data is a key requirement in virtually all CRM projects. Data security requirements often cover a broad spectrum of needs from just keep non-users from seeing it, all the way to complex rules that are challenging to implement in a non-dynamic security model. Architecting a security model is all about trading off and ensuring the right level of protection with the least amount of friction that slows down the user from doing their job. And of course ensuring the security design implemented doesn’t slow down the system any more than necessary.
Chapter 18 - Taking CRM on the Road
Microsoft Dynamics CRM has seen quite a transformation over the past few years. It used to be that Dynamics CRM was wearing a business suit and used only the inside of an office. Then with CRM 4.0 and 2011 it took off its necktie with IFD, but you still had to use it on a laptop or desktop computer. Now it can be used on virtually any device, including computers, both Windows and Mac, tablets like iPads and Microsoft Surface, and smartphones. CRM has traded its business suit for hiking boots and has hit the road. You can now use it from wherever you work and on virtually any device. In this chapter we are going to explore the ways to use Microsoft Dynamics CRM on modern devices, and what you should do to get the most out of CRM on these devices.
Chapter 19 - Emails, Appointments Synchronization Overview
This chapter explores how CRM and its spin-offs in the xRM realm deal with trying to understand an organization’s relationship with their customers, members or other external parties. Part of this is of course the structured data in the form of fields that are contained in the account and contact forms. However, a large part of this is also trying to understand and store the communication that people in these organizations have with all these external customers, members etc. and their respective contacts. For this reason many activities have been created in CRM that allow for storing of this data, most notably email. The purpose of this being to create transparency within an organization of who is communicating with whom, in regards to what, and what the message is.
Chapter 20 - Server Side Sync
As discussed in the previous chapter, the synchronization of activities between Microsoft Dynamics CRM and Microsoft Exchange (and other compatible email servers) is one of the most important features of a CRM system. The focus of this chapter is to explore the new email profiles capabilities in detail as well as Server Side Sync, a functionality that we have all been waiting for for years. In this chapter we will tackle the subject from multiple angles, we will focus on the why, the what, and the how, and we will cover common Server Side Sync troubleshooting techniques.
Chapter 21 - Data Management
This chapter explains different approaches to Data manipulation (initial loading, synchronizing existing data, updating existing data looking for criteria, etc.), with real examples and time analysis to understand where the improvement points are. Based on a data example of 100,000 records and using the standard features and Dynamics CRM SDK you can understand time differences between CRM Online and On-Premise, and loading system or custom entities. It concludes with learning which solution to adopt for any scenario you need in the real world.
Chapter 22 - Dynamics Connector
Become an integration hero without a single line of code. In this chapter you will learn what a Dynamics Connector is and how you can use it to integrate systems in your CRM deployments. We will cover the introduction to integration approaches and briefly discuss when you should consider using the Connector. Then I will delve deeper into Connector for Dynamics architecture and its components, as well as supported integration types. Once finished with the introductions we will get our hands dirty with setting up real integrations, customizing maps and customizing the Connector. Read this chapter to get deep knowledge of what the Connector for Microsoft Dynamics is and how to use it.
Chapter 23 - Workflow and Dialogs for the BA
The chapter introduces the reader to the concept of processes in Dynamics CRM 2013; automated routines used -to assist with a business’ work processes. The focus of the chapter is workflows and dialogs, with the other two process types: Actions and Business Process Flows, being dealt with elsewhere in the book. The steps involved in creating workflows and dialogs, the method in which they run and real-world examples are explored.
Chapter 24 - No Code Business Rules
At the heart of every CRM implementation is a boat load of business requirements, many of which are implemented by one or more business rules. Generically, a business rule is often one or more simple conditions that must be true and when they are one or more actions occur. CRM comes out-of-the-box with a number of business rules implemented that are expected to meet a large number of business needs. Many of these can be customized so they are tailored to fit more specific project needs. Beyond that, developers can use code to implement client side rules with JavaScript or server side rules with CRM extensions like plug-ins. This chapter explores the options, customizations and use of the out of the box features and gives scenario examples for their use.
Chapter 25 - Real time Workflows
Workflows in CRM have for a while been a powerful way to automate tasks that would otherwise be tedious for users or to ensure consistency in processes. Workflows however were limited to being able to run in the background. While this works great and makes sense for long running processes that could take months, it is not ideal when you desire the user to see results immediately. For these needs CRM projects turned to developers to create plug-ins that had the ability to run real time. While plug-ins are powerful, and still have a place for many small tasks, using a workflow to define the steps would be adequate if the workflow simply could run immediately. As of CRM 2013, workflows can now be configured to be Background (like they previously ran, asynchronously) or Real Time (synchronous like plug-ins).
Chapter 26 - Solutions
Life in the software world is changing rapidly as we now find ourselves in a paradigm driven by approaches like “Cloud-First” or “Online-First”, these approaches are being adopted by software vendors both large and small. The benefits of these strategies are vast, not least of which is the ability to be far more agile with product enhancements, in order to adapt and survive in today’s competitive landscape. Microsoft has been clear for some time now that “Cloud-First” is their approach of choice with Dynamics CRM Online leading the charge. We need to have a clear understanding of what is required to build and package Solutions in such a way that they can keep up with this rapid release cadence, as well as an understanding of what has changed to date in the Solution framework and what might change in the future, as the framework itself evolves to better handle the deployment of these changes.
Chapter 27 - Developers, Developers, Developers
Developers are integral engineers of the Dynamics CRM landscape. When our job is done best we are invisible. In this chapter, we'll look at the new and exciting enhancements in CRM 2013 and what they mean for us, and the relationship with consultants and other non-developers. From Real-time Workflows to jQuery, we'll cover everything you need to know to adapt to a changing development role.
Chapter 28 - Parature!
Turning your classic phone and email support strategy into a new social media friendly concept of offering support and services by adding and using features from Microsoft Parature – that´s what the chapter is all about. Find an introduction of Microsoft Parature and some of the new capabilities Microsoft Dynamics CRM can benefit from. Think of new service/support offerings your company can add by simply using the integration between Microsoft Parature and Microsoft Dynamics CRM. Read about Live-Chat, Social Network integration and new Knowledgebase capabilities and turn your customer care cost center into a customer loved profit center.
Chapter 29 - Curriculum Guide
The CRM Field Guide Volume Two offers you details not only on CRM fundamentals and extensibility points but also the tried and true best practices and strategies of the combined experience of some of the most recognizable global experts in the CRM industry. The challenge with the book is that it is potentially overwhelming in the content it contains at 900+ pages in 28 chapters. This chapter answers “which chapter do I start with and in what order do I proceed?” The curriculum guide is based on eight personas and one environment. The most relevant chapters for each discipline are organized in recommended reading sequence.

sábado, 18 de abril de 2015

Utilizando el nuevo Seguimiento de Cambios (Change tracking) en Update 1

Hola, sigo probando el Update 1 (Carina), y hoy voy a mostrar como utilizar el Change tracking.

El change tracking ya esta documentado en la nueva versión de la SDK (aún en preview) aquí: https://msdn.microsoft.com/es-es/library/dn932130.aspx

La idea del Change Tracking, es recoger los cambios producidos en una entidad, con el objetivo de sincronizarlo con otro entorno. Solamente puede ser utilizado por SDK, y hoy os paso un ejemplo de esto.

Para habilitar esta funcionalidad, primero se debe ir a CRM y activar en la entidad el Change Tracking:

image

La idea de ejecución de SDK, es muy simple, podemos consultar una entidad, y pedirle los cambios. El código es como el siguiente:

               RetrieveEntityChangesRequest req = new RetrieveEntityChangesRequest();
               req.EntityName = "contact";
               req.Columns = new ColumnSet(true);
               req.PageInfo = new PagingInfo()
               {
                   ReturnTotalRecordCount = true,
                   Count = 1000,
                   PageNumber = 1
               };
               RetrieveEntityChangesResponse res = (RetrieveEntityChangesResponse)service.Execute(req);

               for (int i = 0; i < res.EntityChanges.Changes.Count;i++ )
               {
                   if (res.EntityChanges.Changes[i].Type == ChangeType.NewOrUpdated)
                   {
                       NewOrUpdatedItem accion = (NewOrUpdatedItem)res.EntityChanges.Changes[i];
                       Entity record = accion.NewOrUpdatedEntity;
                   }
               }

Ahí como se ve, podemos pedir los datos paginados, y luego leer los resultados que finalmente son entidades. Además puedo pedir una serie de columnas, o todas.

Este ejemplo, me devolverá todo lo que ha cambiado, pero os estaréis preguntando… ¿como filtro por fechas? para eso hay un parámetro adicional en el “Request” con el nombre “DataVersion”. El Data versión, lo podemos recoger por ejemplo de una primera ejecución del código y recogiendo el “DataToken” de la respuesta (me devuelve 17 cambios):

image

Vuelvo a ejecutar el mismo código, pero esta ver añadiendo como DataVersion el valor “647621!04/17/2015 23:21:06”:

image

Como se puede ver, ahora no devuelve ningún cambio, y me devuelve un nuevo DataToken. Si voy al CRM, y hago cualquier cambio en los contactos, básicamente me creo un contacto:

image

Vuelvo a ejecutar el mismo código y tengo el nuevo cambio:

image

El campo DataVersion esta relacionado con el timestamp del registro y nos permite hacer sincronizaciones con otros entornos, guardando el último y así facilitar las mismas.

Espero les haya gustado.

un saludo

@demian_rasko