La presentazione è in caricamento. Aspetta per favore

La presentazione è in caricamento. Aspetta per favore

Gli strumenti di sviluppo e personalizzazione di Microsoft CRM 3.0

Presentazioni simili


Presentazione sul tema: "Gli strumenti di sviluppo e personalizzazione di Microsoft CRM 3.0"— Transcript della presentazione:

1 Gli strumenti di sviluppo e personalizzazione di Microsoft CRM 3.0
Marcello Fisicaro Partner Technology Specialist Microsoft Italia

2 todo VM METTERE EVENTO UPDATE Rivedere Stabilire demo

3 Avvertenze Questa rappresenta solo una previsione delle aree di investimento della nuova versione del CRM Le informazioni sono aggiornate a Dicembre 2005 Date e funzionalità possono essere soggette a cambiamenti Le immagini sono da considerarsi prototipi Disclaimer This presentation contains preliminary information that may be changed substantially prior to final commercial release of the software described herein. The information contained in this presentation represents the current view of Microsoft Corporation on the issues discussed as of the date of the presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of the presentation. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this presentation. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this information does not give you any license to these patents, trademarks, copyrights, or other intellectual property. © 2005 Microsoft Corporation. All rights reserved.

4 Agenda Introduzione Personalizzazione “Data & Experience”
Personalizzazione dei processi Developer Experience Reporting & Business Intelligence Q & A This slide is required. Do NOT delete. If you have questions, please contact your track owner and/or SMSG Readiness RPM for guidance. This slide should introduce the session by identifying how this information helps the attendee, partners and customers (CPE – Customer & Partner Experience) be more successful. From a CPE perspective, why is this content important. This slide should call out what’s important about the session (sort of the why should we care, why is this important and how will it help our customers/partners be successful) as well as the key takeaways/objectives associated with the session. Call out what attendees will be able to execute on using the information gained in this session. What will they be able to walk away from this session and execute on with their customers. Good Objectives should be SMART (specific, measurable, achievable, realistic, time-bound). Focus on the key takeaways and why this information is important to the attendee, our partners and our customers. If you are unsure of the objectives/takeaways for your presentation, please contact your Track Owner and/or SMSG Readiness RPM listed below: Track Owners and SMSG Readiness RPMs Architecture – Norman Guadagno, Mark Glikson, Jeff Vilimek, Harry Pierson Windows Infrastructure – Elizabeth Sherlock SMSG Readiness RPM (Readiness Product Manager) – Zaakera Stratman Management & Operations – Martin Dey Security – Aaron Turner, Susan Nerseth SMSG Readiness RPM (Readiness Product Manager) – Aaron Turner Application Platform – Mark Glikson and Steven Salazar Aray SMSG Readiness RPM (Readiness Product Manager) – Robert Stewart Messaging – Doug Hung and Mary Alice Colvin SMSG Readiness RPM (Readiness Product Manager) – Marzena Makuta Database – Haydn Richardson, Marty Collins SMSG Readiness RPM (Readiness Product Manager) – Stephen Dybing Business Process & Integration – Kirby Bartholomew Information Worker/Portals – Dave Marcus SMSG Readiness RPM (Readiness Product Manager) – Ryan Whisnant Microsoft Business Solutions - Lori Thalmann Pytlik, Barb Edson Mobile & Embedded Devices – Dan Arildson Solutions - John Dwyer SMSG Readiness Product Manager (RPM) - Mike Newton

5 Introduzione

6 Microsoft CRM | Integrato e completo
Una completa soluzione di CRM che utilizza la potenza e la produtttività della piattaforma Microsoft. Vendite Servizio Marketing Adattabile al tuo modo di operare Esperienza nativa Office e Outlook Semplice e utilizzabile off-line Configurabile con il tuo business Facilmente adattabile ai processi aziendali Framework completamente personalizzabile Motore di workflow e analitico Tecnologicamente avanzato Gestione centralizzata e semplificata Architettura SOA Facile integrazione

7 Microsoft CRM | Elementi chiave
Native Outlook Experience “User experience” comune con Office UI “role based” Riduzione sforzo per ogni attività Works the Way You Do Easy Adaptability Vasta business applicability Ricchi workflow guidano processi consistenti Closed-loop tracking e reporting Works the Way Your Business Does Works the Way Technology Should Build, Deploy & Extend Installatione e maintanence ridotta Srumenti di configurazione e personalizzazione comuni Integrazione semplice via Web services

8 Customization Spectrum
Light Per-User Attributes Workflow Forms, Views None Average 1-way Organization Entities, Relationships Workflow Libraries Navigation, Reports Extensive Security Cross-DB Web Services, Callouts Controls, Script 2-way Impostazioni Dati Processi Esperienza Integrazione

9 Architettura piattaforma
In general, there are three physical layers within the Microsoft CRM architectural "stack," as illustrated in the following figure. These are the client, application, and server layers. The server layer contains what you use in the Microsoft Platform SDK. Microsoft CRM relies on Active Directory®, the Microsoft® Windows® operating system directory service, and on two external Microsoft applications to perform additional processing. Active Directory is used for authentication. Microsoft Exchange 2000 Server and Microsoft Exchange Server 2003 are used for sending and receiving messages. Microsoft SQL Server™ 2000 is used as the data storage mechanism. Platform The platform is the heart of the Microsoft CRM system. When you use the Microsoft CRM SDK, you are building on top of this system. The Microsoft CRM platform supports smaller deployments and can scale for application service provider (ASP) models as well. The focus of the security model is protection of the platform from unauthorized access across the Web. The main platform components are: The database System services (workflow) The object model A query processor that supports the object model Secured ad-hoc queries that use an Extensible Markup Language (XML) fetch statement to protect the physical database Callouts for business logic extensibility When you develop an application using the Microsoft CRM platform, you use messages formatted as XML strings to communicate with the underlying platform layer. You use SOAP for communication between an application and the platform. The platform is responsible for creating domain-specific objects. In the Microsoft CRM space, these objects include contact, lead, opportunity, account, and business unit, among others. The goal of the platform is to implement the service-specific rules by manipulating and combining the underlying domain objects. The platform does not impose business-specific logic. This layer imposes only generic domain constraints. It contains the building blocks for an application, but by itself is nothing more than a collection of related objects. However, the interaction between those objects within the domain can be assumed to implement more extensible logic such as the quote-to-order-to-invoice processing and pricing logic. The platform does more than just contain the Microsoft CRM business objects. It is responsible for controlling access to objects through security, for controlling access to the database, and for raising events for workflow processes and custom business logic implementations. Think of the platform layer as providing all of the "hard" plumbing work necessary to implement a complete Microsoft CRM application. The platform layer provides for both inbound and outbound processing through the CRM-Exchange Router. The platform also implements a replaceable pricing module for opportunities, quotes, orders, and sales invoices. Data Tier The data tier is the lowest level of the platform and consists of a database (loosely speaking) and a well-defined data access layer. The data management tier in Microsoft CRM supports Microsoft SQL Server 2000 as the primary data store. The data access layer provides a consistent programming interface for the service developer, which abstracts platform business logic from the underlying data source. The platform tier is the only direct consumer of this layer. The data store hides the data access mechanism and exposes a common interface, in this case the Transact-SQL programming language. Microsoft CRM internally uses an object-based data management layer to shield the platform code from the data access code. Just as it's not possible for an application developer to directly access the database, it's also not possible for a platform developer. This object-based data management construct is exposed to the application developer with QueryExpression, QueryByAttribute and FetchXML query language. For more information, see Building Queries. Security The Microsoft CRM Software Development Kit (SDK) provides you with a security model that protects data integrity and privacy, and also supports efficient data access, teamwork, and collaboration. The Microsoft CRM security model was designed with the following goals: Support data sharing, so that users can access objects for collaborative effort. Prevent users from accessing objects for which they do not have access or that have not been shared with them. Categorize types of users to define roles and restrict access based on those roles. The first two goals relate to object security; the last goal relates to role-based security. The object security model focuses on access rights to the entities in the system. The role-based security model provides a means to group a set of privileges together to describe the responsibilities for a user. The Microsoft CRM security model is both robust and flexible. As a result, the SDK offers different security privileges that you can combine together to define the overall security rights users have within your custom Microsoft CRM application. For an in-depth explanation of the security model, refer to Microsoft CRM Security Database Microsoft CRM is a metadata-driven product. This means that the vast majority of its work is focused on abstracting itself away from the implementation details that so often cause problems with upgrades and extensibility. The metadata layer in essence abstracts the underlying data storage details, such as schema and data access, from the higher level constructs of domain-logic implementation and user interface. The word metadata literally means "descriptive information about the elements of a set of data." The metadata can be thought of as a description of the underlying data structures that controls how the application (platform and user interface) operates and displays itself. The platform uses the metadata to buffer itself from changes to the underlying database structures. If a table definition changes (for example, when columns are added or removed), the platform code continues to operate without any performance or degradation. This means that Microsoft CRM can be altered significantly to meet a particular business or vertical definition and still operate without interruption. The Microsoft CRM platform is not the only consumer of the metadata. The application layer uses the rules inherent in the metadata to present the exact user experience offered by vertical solutions and customizations. These rules include attribute type definitions, entity definitions, and attribute context rules. Attribute metadata describes the underlying type structure of a given attribute, including the fundamental data type (such as string, integer, or date) and the information that effectively limits the attribute's type definition (such as its size and range values). Attribute context rules describe when and how a given attribute can be used. For example, some attributes are write-once, such as order numbers. These attributes should not be changed after they have been created because changing them causes ripple effects throughout the business data. Other attributes are always read-only and are supplied by the platform itself. The metadata captures all of these rules about context, but it also captures business-defined rules, such as business-recommended and business-required attributes. Workflow The workflow subsystem's goal is to process system events and run processes. The workflow system consists of: The Workflow Manager tool that provides a graphical user interface for creating processes. The Workflow Monitor tool that provides a graphical user interface for viewing process instances. The Workflow Service (a Microsoft Windows service) that responds to events, schedules events, and runs processes. The Workflow Service is available in the Services utility in Windows Administrative Tools. This service is installed during Microsoft CRM Server installation and is configured to be started automatically. A set of messages for accessing instances workflow rules. For more information, see the RetrieveProcessesByObjectWFProcessInstance, RetrieveWFProcessInstance, and ExecuteWFProcessInstance classes. .NET Workflow Assemblies For more information about the workflow tools, please see the online help provided in each tool. Business Logic Extensions Microsoft CRM exposes a very simple extension mechanism for implementing custom platform-based business logic — a COM-based "callout" model. With this model, application developers are not limited to creating custom business logic only in the application or through workflow processes; they can also construct business logic that runs in the context of a call, but in response to a particular event. This extension mechanism exposes a callout interface that is based on a simple pipeline model. The pipeline model allows for both "pre" and "post" interceptions for the most basic data persistence operations. The platform metadata stores information about each entity. This information about entities can be used to track the list of callout handlers, the class names, and whether a given handler is required for an action. For example, the account object can have several registered handlers. These handlers are stored in call order, which is determined by priority. When an action occurs, the platform checks the metadata for registered event handlers. This information is specified in a callout configuration file. If a handler is registered for notification, the platform creates the handler object and calls the correct handler method, passing the original XML document. See Business Logic Extensions (Callouts).

10 Architettura di Microsoft CRM 3.0
Customization Tools: Customize, add, and rename entities. ISV Script/Form Customization: Customize forms using the Client Side SDK. ISV Code: Add your own features to the application using the application configuration file and the SDK. Custom Reports: Use filtered views to create custom reports within Microsoft CRM and directly in Microsoft Excel, Microsoft Access, and more. Import/Export: Export your customization for installation into a production environment. Pre/Post Callouts: Augment the Microsoft CRM business logic with your own. These callouts can also be used for integration to external systems. Workflow Rules: Create rules to automate your business processes. Workflow NET Assemblies: Call out to external systems from your workflow rules. Service Management Plug-Ins: Plug in a new service scheduling module. Outlook Client Customization: Customize your offline client using the configuration file and custom code via the SDK.

11 Customization Points Customization Tools: Customize, add, and rename entities. ISV Script/Form Customization: Customize forms using the Client Side SDK. ISV Code: Add your own features to the application using the application configuration file and the SDK. Custom Reports: Use filtered views to create custom reports within Microsoft CRM and directly in Microsoft Excel, Microsoft Access, and more. Import/Export: Export your customization for installation into a production environment. Pre/Post Callouts: Augment the Microsoft CRM business logic with your own. These callouts can also be used for integration to external systems. Workflow Rules: Create rules to automate your business processes. Workflow NET Assemblies: Call out to external systems from your workflow rules. Service Management Plug-Ins: Plug in a new service scheduling module. Outlook Client Customization: Customize your offline client using the configuration file and custom code via the SDK.

12 Customization Points Web services Callouts UI customizations
Permettono l’integrazione con altre piattaforme nonchè l’accesso a dati e logica di business di Microsoft CRM Callouts Estendono le funzionalità dei Web Services e integrano logica di business customWorkflow Assemblies Estendono le funzionalità di Workflow UI customizations Albero di navigazione Role based etc Schema customization Aggiungere entità e proprietà nuove Form customization Personalizzare form, viste e integrare elementi UI Form events Sviluppo attraverso gli eventi per aggiungere logica

13 Personalizzazione “Data & Experience”

14 Personalizzazioni strutture dati
Personalizzazione schema estensiva Creare/Rinominare entità, attributi, relazioni Personalizzazione attività Supporto per client Web e Offline Customer Benefit Foundation per le soluzioni verticali Gestione schema efficente Strumento all’interno del web client Permessi più granulari Pubblicazione personalizzazioni senza reset Riduce la necessità di coinvolgere l’IT TODO rivedere come si personalizzano le attività Permessi più granulari? Basic validation? Attribute namespace? Schema Portability Import/Export supportato anche per le nuove funzionalità Distribuzione dei cambiamenti più semplice

15 Entità Custom Design schema per le verticalizzazioni
Activities ‘COLA’ SOP All Invoices Orders Products Quotes Sales Literature Contacts Opportunities Leads Accounts New Entity Support Basic Cases Contracts Contract Lines Addresses Users Marketing List

16 Personalizzazione dati
Business design flessibile Design business forms e entità senza scrivere codice. Utilizzo dei termini del vostro business in forms, viste e report Sincronizza offline anche entità custom

17 Overview Custom Entities and System Entities Planning a Custom Entity
Ownership Type Entity Relationships Primary Related Cascading Behavior Entity Security and Customizations Working with Custom Entities Creating Entities Configuring a Custom Entity Outlook Participation

18 Lesson: Custom Entities and System Entities
Similarities A user interface is generated for them in the application They are defined using the same customization tools Client-side events can be leveraged in the same way Custom entities are customizations that can be imported and exported like customizations to system entities Custom menu items and buttons can be added Relationships with other entities can be defined Mapping can be configured

19 Lesson: Custom Entities and System Entities
Similarities, cont. The entities can be taken off-line with the Microsoft CRM client for Outlook Custom entities participate in merge operations Custom entities are fully integrated in the Security framework Callouts are supported with Custom entities Custom entities have methods that can be accessed by developers Filtered views are created to support reports on custom entities

20 Creazione di una nuova entità Considerazioni
Ownership Type Organization / User Owned (es Product/Account) Entity Relationships Primary/ Related Relationship (1 many/ many 1) Cascading Behavior Parental / referential / referential restricted / configurable cascading Cascade all / active / user owned / none / remove link /restrict Actions: Assign/ Share/ Unshare/ Reparent/ Merge/ Delete Mappings Entity Security and Customizations

21 Ownership Type Organization Owned User Owner
An entity that is owned by the organization cannot be assigned to a particular user. Organization owned entities typically contain data involving something that belongs to the organization. Product is an example of an Organization Owned System entity. User Owner A user owned entity must be associated with a user. User owned entities typically contain data relating to customers. The user is the primary owner of the relationship between the related customers and the organization. Account is an example of a User Owned System entity.

22 How a relationship is referred to depends on how you look at it.
Entity Relationships Represents how the entities are related to each other within the Microsoft CRM Platform. Consider these relationships as Primary and Foreign Key relationships in a database, but remember, these relationships are defined by the platform and not in the database. How a relationship is referred to depends on how you look at it. The same relationship can be referred to as either a Primary relationship or a Related relationship depending on which entity you are viewing the relationship from.

23 Entity Relationships Primary Relationship Related Relationship
A primary relationship is where the entity is defined as a parent for another entity. There will be a 1:Many relationship between the Primary Entity and the Related Entity. The Parent entity represents the “1” in a 1:Many relationship. Related Relationship A related relationship is the same relationship as the Primary relationship except that it is defined from the Child entity. The Child entity represents the “Many” in a 1:Many relationship.

24 Cascading Behavior In Microsoft CRM you can control how certain actions taken on a parent record affect any child records. The actions that have cascading behavior are: Assign/Share/Unshare/Reparent/Merge/Delete Cascade all Eredita su tutto Cascade active Eredita solo su attivi o open (Not in delete) Cascade User Owned Solo su oggetti posseduti da utente corrente Cascade None Non eredita Remove link Toglie solo il link (Only in delete) Restrict Impedisce cancellazione ent primaria

25 Lesson: Customizable Entities – Activities
In Microsoft CRM 1.2, there was one entity called Activity – any task could be specified as a type of activity: a phone call, fax, task, etc. This was difficult because activities could not be customized like other entities. In Microsoft CRM 3.0, activities (phone calls, s, fax, task, and letters) are separate entities and can be customized like other entities.

26 Personalizzazione esperienza Flessibilità e supporto a soluzioni
Form Scripting Field Events: OnLoad, OnSave, OnChange Metodi per accedere a client /attributi / state Proprietà per ObjectID, Object Type Code Customer Benefit Foundation per soluzioni verticali Form Customization Supporto IFrame layout migliorato Supporto upgrade per estensioni ISV registrate in ISV.config Minori costi per personalizzazione e upgrade DataValue Navigation Navigatione custom via SiteMap Integrazione con entità custom Consistenza fra web e Outlook Estensioni al menu Outlook Esperienza personalizzata consistente

27 CRM Form Designer Look della form Formato colonne
Add/remove/move Fields/Tabs/Sections Eventi legati ai campi Add/configure IFrames Etichette

28 Used for a variety of purposes, including the ability to display:
Lesson: IFrame Inline Frame – A frame that can be inserted within an HTML document; a document within a document. Used for a variety of purposes, including the ability to display: Another website Dynamic web application Dynamic help

29 Proprietà per accedere alle info della form aperta
CRM Form Object Model Proprietà per accedere alle info della form aperta Metodi che permettono l’invocazione di azioni sulla form Sintassi: crmForm.propertyname Accesso ai campi della form crmForm.all.{field_schema_name}

30 CRM From Object Model Esempi
//Setup variables var CRM_FORM_TYPE_CREATE = "1"; var CRM_FORM_TYPE_UPDATE = "2"; //Test the FormType and ObjectId properties: switch (crmForm.FormType) { case CRM_FORM_TYPE_CREATE: alert("This is a create form."); break; case CRM_FORM_TYPE_UPDATE: alert("This is an update form, the ID is " + crmForm.ObjectId); } //Setup variables var CRM_ENTITY_ACCOUNT = 1; var CRM_ENTITY_CONTACT = 2; //Test the ObjectTypeCode property: switch (crmForm.ObjectTypeCode) { case CRM_ENTITY_ACCOUNT: alert("This is an Account form."); break; case CRM_ENTITY_CONTACT: alert("This is a Contact form."); }

31 CRM Form Fields Operazioni e proprietà generali
//Toggle the disabled state of the filed var oField = crmForm.all.SOME_FIELD_ID; oField.Disabled = !oField.Disabled; //Use RequiredLevel to parse form logic var CRM_REQUIRED_LEVEL_NORMAL = 0; var CRM_REQUIRED_LEVEL_RECOMMENDED = 1; var CRM_REQUIRED_LEVEL_REQUIRED = 2; switch (oField.RequiredLevel) { case CRM_REQUIRED_LEVEL_NORMAL: alert("This field is not required or recommended"); break; case CRM_REQUIRED_LEVEL_RECOMMENDED: alert("This field is business recommended"); break; case CRM_REQUIRED_LEVEL_REQUIRED: alert("This field is required"); break; } //Use of IsDirty property var oField = crmForm.all.SOME_FIELD_ID; if (oField.IsDirty) { alert(“Field's value changed.");} else { alert(“Field's value not changed."); }

32 Isv.config Possibilità di personalizzare toolbars/ menu
Export, Edit, Import Impostazioni viste anche da Outlook <configuration version=" "> <Root> <ToolBar> <Button Title="XML Feeds" ToolTip="Guarda gli XML feed disponibili" Icon="/rss/rss.ico" Url="/rss/rss.aspx" WinMode="0" /> </ToolBar> </Root> <Entities> <Entity name="account" >

33 Sitemap Possibilità di personalizzare completamente la navigazione
Export, Edit, Import Impostazioni viste anche da Outlook Integrazione con le entità custom <SiteMap> <Area Id="Workplace" Title="Area di lavoro" ResourceId="Area_Workplace" ShowGroups="true" Icon="/_imgs/workplace_24x24.gif“ DescriptionResourceId="Workplace_Description"> <Group Id="MyWork" Title="Personale" ResourceId="Group_MyWork" DescriptionResourceId="My_Work_Description"> <SubArea Id="nav_activities"

34 Overview strumenti di personalizzazione
Es “integrazione con Mappoint service” Es nuova entità fornitore Area BI Andare in Personalizzazione Aprire entità cliente Mostrare evento onload Andare su campo settore e mostrare evento onchange Andare su tab Mappa e mostrare presenza IFRAME (TODO preparazione: Aprire progetto C:\Inetpub\ASPNET11\CRMMapping\CRMCust.sln) Cliccare su BI Aprire da My docs\Personalizzazioni\personalizzazioni_SITENAV.xml e mostrare area BI

35 Personalizzazione dei processi
Workflows

36 Workflow Realizzazione di regole per automazione di processi
Strumenti in base al profilo Workflow Editor Realizzazione di workflow (admin) Su attività Entità custom etc Estensione di azioni/condizioni (dev) Workflow Monitor (debbugger per admin) Callout (dev)

37 Strumenti di workflow per i processi di Business
Workflow Editor Creazione, modifica, impostazioni regole di workflow. Workflow Monitor Status dei processi di workflow in corso

38 Lesson: Workflow Available with More Entities
Activities In previous versions, workflow could create activities but could not be associated with the Activity Entity. In Microsoft CRM 3.0, activity entities were broken out into separate entities that support workflow: Appointment Fax Campaign Activity Letter Campaign Response Phone Call Service Activity Task Custom Entities All created, user-owned custom entities will support workflow

39 Defining Wait for Timer Conditions
Workflow rules can include Wait for Timer conditions to control the actions that are performed. Wait for timer conditions existed in previous version of Microsoft CRM, but with the ability to reference fields other than “createdon” or values stored in a call assembly reference, they are much more powerful.

40 Workflow Wait for Timer Conditions
Basic Condition Specific Condition Description Wait for Timer From now on Allows for entry of a static time period to wait from the moment of execution. The time period can be up to 25 months. After Allows for entry of a static time period to wait after a related object was created. This can include a time referenced in an assembly. The expression can also be reevaluated to compare other datetime values on the bound object when those fields are updated. Before Allows for entry of a static time period to wait before a date time. This might be used to send a reminder based on the start time of an appointment.

41 Microsoft.Crm.Platform.WorkflowAssembly.dll Microsoft CRM 3.0 has an assembly to give some useful datetime functions. This assembly also demonstrates how a configured Call Assembly action is used. The Microsoft.Crm.Platform.WorkflowAssembly.dll provides two methods: Add DateTime Subtract DateTime These methods can be used to modify date time values for objects in Workflow. Either of these methods also allows users to reference a DateTime value even if they do not intend to modify that time.

42 Estensibilità – Nuove Azioni Creazione nuove Azioni / Condizioni
Estensione del workflow con codice custom .NET based Facile subscription e deployment Workflow manager support Integrazione con VS.NET & CRM Web Services Messaggi Rich context Benefit Modellazione di processi ricca e flessibile

43 Estensione regole di Workflow Creazione di estensioni con assembly .NET
Asincrone (accodate) Parametri in ingresso e uscita Utilizzo delle estensioni dal Workflow manager Eventi: Create, State change, Assign Facile deployment copiando assembly .NET e attraverso un file di configurazione XML

44 Estensione regole di Workflow Creazione di estensioni con assembly .NET

45 Estensione regole di Workflow Creazione di estensioni con assembly
Estensione regole di Workflow Creazione di estensioni con assembly .NET Modifica file workflow.config Es: creazione di sito sharepoint collegato alla creazione di una opportunità <method name=“CreateSite" assembly=“Sharepoint.dll" typename=“Sharepoint.SiteCreator" methodname=“CreateSite“ group=“Sharepoint Functions”> <parameter name=“ID" datatype=“lookup“ entityname=“account”/> <parameter name=“Name" datatype=“string"/> </method> <method name="CreateSite" assembly="Microsoft.Crm.Workflow.Demo.SharePoint.dll" typename="Microsoft.Crm.Workflow.Demo.SharePoint.SiteCreator" methodname="CreateSite" group="Sharepoint Functions"> <parameter name="ID" datatype="lookup" entityname="opportunity"/> <parameter name="Name" datatype="string"/> <result datatype="string"/> </method>

46 Extensibilità - Callout
Estensioni attraverso logica custom .NET e basati su eventi Facile subscription e deployment Eventi POST e PRE Ricche informazioni contestuali Integrazione con Web Services CRM Sincroni e transazionali Benefit Costruzione di soluzioni fortemente integrate Old V1.2 COM model is supported but deprecated

47 Estensibilità - Callout
Es: assembly.NET per tracciare cambiamenti di sconto e mandare messaggi di modifica .NET assembly per il calcolo dello sconto <callout.config version="3.0"> <callout entity="quote" event="PostUpdate"> <subscription assembly="MessagingPlugin.dll" class="MessagingPlugin.Messages"> <prevalue>discountpercentage</prevalue> <postvalue>discountpercentage</postvalue> <prevalue>totallineitemamount</prevalue> <postvalue>totallineitemamount</postvalue> </subscription> </callout> </callout.config> TODO fare funzionare un callout

48 Pre-Callout Sincrono Parametri gestiti: Modifica dati “on the fly”
Eventi PreCreate PreUpdate PreDelete PreAssign PreSetState PreMerge Sincrono Parametri gestiti: Entity e User Context Attribute “influenzati” Modifica dati “on the fly” Gestione controllo attraverso comandi Continue, Stop, Abort

49 Post-Callout Sincrono Informazioni ricche: Stato pre Stato post
Eventi PostCreate PostUpdate PostDelete PostAssign PostSetState PostMerge Sincrono Informazioni ricche: Stato pre Stato post

50 Callout Esempio di codice
public class CalloutSample : CrmCalloutBase { // This function is called before an account is created. public override PreCalloutReturnValue PreCreate(CalloutUserContext userContext, CalloutEntityContext entityContext, ref string entityXml, ref string errorMessage) ..... return PreCalloutReturnValue.Continue; }

51 Personalizzazione dei processi
Processo di vendita Integrazione con sharepoint Mostrare Workflow manager Mostrare processo di vendita legato ad opportunità Mostrare regola su creazione cliente partner Aprire partner4 e mostrare tab Collaboration Mostrare Workflow Monitor

52 Developer Experience

53 Developer Experience Integrazione con Visual Studio .NET Benefits
Supporto estensivo a IntelliSense Classi e messaggi “Strongly typed” Managed code development model Benefits Sviluppo veloce e a basso costo. Scrivi meno codice. SOA & Interoperabilità WSDL e modello “platform independent” Compliancy a Standard (WS-I BP V1.1) Gestione dei web service semplice per tutte le entità Facile integrazione con altre applicazioni Pieno supporto alle personalizzazioni Generazione dinamica dei type (WSDL) Seamless programming model Supporto al Polimorfismo Meno codice e più generico

54 Microsoft CRM Web Services
WSI, BP v1.1, WSDL, Single Endpoint Strongly typed .NET based CRM Web Service (CrmService.asmx) Accesso ai dati di tutte le Entità (incluse entità custome e proprietà) Esecuzione delle business op (business logic e op specializzate) Metadata Web Service (MetadataService.asmx) Accesso ai metadati del CRM

55 Confronto fra Web Services V3.0 vs. V1.x
V1.X Web Services Nuovi web services XML based (no type support) Runtime errors Strongly typed Design/Compile time errors Core Entities and Properties Custom Entities and Properties Strongly typed child properties Browse-able class hierarchy Precompiled static Proxy dlls Dynamically generated WSDL N Entities  N Web Services Low scalability N Entities  One Web Service High scalability No versioning Versioned schema and Web Service .NET only Dll based deployment Any platform WSDL with no deployment Low consistency High level of consistency on naming, types and operations support

56 Business Entity And Data Model

57 CrmService: Metodi comuni
Create - System.Guid Create(BusinessEntity businessEntity) Crea un istanza di una qualsiasi entità Retrieve - BusinessEntity Retrieve(string bEName, Guid bEId, ColumnSet columnset) Ottiene una istanza di una entità già presente nel CRM RetrieveMultiple - BusinessEntityCollection RetrieveMultiple (QueryBase queryBase) Usa una query custom (QueryExpression) per ottenere risultati strongly typed Update - void Update (BusinessEntity businessEntity) Aggiorna una istanza di entità estitente nel CRM Delete - void Delete (string bEName, Guid bEId ) Cancella una istanza di entità dal CRM Fetch - string Fetch (string FetchXML) Usa una query custom (FetchXML) per ottenere risultati in formato XML (genericamente utilizzabile) Both entities support the proprietary FetchXML query language. While at first glance this may seem more powerful, especially for developers used to constructing queries in SQL, using the Retrieve or RetrieveMultiple methods will have better performance. This is due to the parsing and validation of the Fetch XML. In addition to using FetchXML to construct and execute queries against the database, you can easily build queries using the query builder class QueryExpression.

58 Differenze: 1.2 vs 3 Non è più necessario specificare url del server (incluso nel WSDL)
// strServer should be set with the name of the platform Web server. String strServer = "MyServerName"; // strVirtualDirectory should be set with the name of the Microsoft CRM // virtual directory on the platform Web server. String strVirtualDirectory = "mscrmservices"; String strDir = String.Concat("http://", strServer, "/", strVirtualDirectory, "/"); CrmService service = new CrmService(); service.Credentials = System.Net.CredentialCache.DefaultCredentials; // Send credentials on first round trip. service.PreAuthenticate = true;

59 Differenze: 1.2 vs 3 Istanziazione Account e Contatto
// Instantiate the BizUser proxy object. Microsoft.Crm.Platform.Proxy.BizUser bizUser = new Microsoft.Crm.Platform.Proxy.BizUser (); bizUser.Credentials = System.Net.CredentialCache.DefaultCredentials; bizUser.Url = String.Concat(strDir, "BizUser.srf"); // Instantiate the Account proxy object. Microsoft.Crm.Platform.Proxy.CRMAccount account = new Microsoft.Crm.Platform.Proxy.CRMAccount (); account.Credentials = System.Net.CredentialCache.DefaultCredentials; account.Url = String.Concat(strDir, "CRMAccount.srf"); // Instantiate the Contact proxy object. Microsoft.Crm.Platform.Proxy.CRMContact contact = new Microsoft.Crm.Platform.Proxy.CRMContact (); contact.Credentials = System.Net.CredentialCache.DefaultCredentials; contact.Url = String.Concat(strDir, "CRMContact.srf"); account act = new account(); contact cont = new contact();

60 Differenze: 1.2 vs 3 Modifica attributo cliente
StringBuilder accountXml = new StringBuilder("<account><name>Account One</name>"); accountXml.Append("<ownerid type=\""); accountXml.Append (Microsoft.Crm.Platform.Types.ObjectType.otSystemUser.ToString()); accountXml.Append("\">"); accountXml.Append(userAuth.UserId.ToString()); accountXml.Append("</ownerid></account>"); act.name = "Account One";

61 Differenze: 1.2 vs 3 Creazione account e contatto
String accountId = account.Create(userAuth, accountXml.ToString()); String contactId = contact.Create(userAuth, contactXml.ToString()); Guid actId = service.Create(act); Guid contId = service.Create(cont);

62 Utilizzo di CrmService Esempio di Creazione di un Account
// Set up the Web service. CrmService service = new CrmService(); service.Url = "http://<servername>/mscrmservices/2006/crmservice.asmx"; service.Credentials = System.Net.CredentialCache.DefaultCredentials; // Create an account entity and assign data to some attributes. account newAccount = new account(); newAccount.name = "Greg Bike Store"; newAccount.accountnumber = "123456"; newAccount.address1_postalcode = "98052"; newAccount.address1_city = "Redmond"; // Call the Create method to create an account. Guid accountId = service.Create(newAccount);

63 Query sui dati CRM QueryExpression QueryByAttribute FetchXML
Valori di ritorno “strongly typed” Query class based Business Entity centrico: può solo restituire valori fa una busuness entity Supporta join Serialize/DeSerialize da/per FetchXML QueryByAttribute FetchXML Valori di ritorno NON strongly typed La query deve essere scrita in XML Business Entity Agnostico: ad es. Può restituire dati da più business entities Usa Advanced Find UI per la costruzione delle query Serialize/DeSerialize da/per QueryExpression Secured/Filtered views Utilizzo di SQL per scrivere query sulle “Filtered views” A QueryExpression is used to programmatically build a query containing data filters and search conditions that define the scope of a database search. A QueryExpression is used for single-object searches, for example, searching for all accounts that match certain search criteria. QueryExpression provides a strong typed (object based) approach to building queries that can be executed. To save a query, you can convert it to Fetch using a QueryExpressionToFetchXml request and save it as a userquery. Because QueryExpression is strongly typed, Microsoft IntelliSense support is available for the QueryExpression object within Visual Studio .NET QueryExpression is the class you use to build complex queries for use with the method RetrieveMultiple or the RetrieveMultiple message

64 QueryExpression Query Class based Valori di ritono Strong type
Useta in RetrieveMultiple Serialize/Deserialize da/per FetchXML

65 Utilizzo di QueryExpression Esempio di codice per il controllo della duplicazione di un account
QueryExpression query = new QueryExpression(); query.EntityName = EntityName.account.ToString(); //entità ricercata query.ColumnSet = cols; // colonne da includere nei risultati query.LinkEntities = new LinkEntity[] {link}; // contiene le varie condizioni in And/Or e entità linkate RetrieveMultipleRequest retrieve = new RetrieveMultipleRequest(); retrieve.Query = query; RetrieveMultipleResponse retrieved = (RetrieveMultipleResponse) service.Execute(retrieve); // Standard CRM Service Setup. CrmService service = new CrmService(); service.Credentials = System.Net.CredentialCache.DefaultCredentials; // Create a column set that holds the names of the columns to be retrieved, ColumnSet cols = new ColumnSet(); // Set the ColumnSet's properties. cols.Attributes = new string [] {"name", "accountid"}; // Create the ConditionExpression. ConditionExpression condition = new ConditionExpression(); // Set the condition for the retrieval to be // when the account owner's last name is not Cannon. condition.AttributeName = "lastname"; condition.Operator = ConditionOperator.NotEqual; condition.Values = new string [] {"Cannon"}; // Build the filter based on the condition. FilterExpression filter = new FilterExpression(); filter.FilterOperator = LogicalOperator.And; filter.Conditions = new ConditionExpression[] {condition}; // Create a LinkEntity to link the owner's information to the account. LinkEntity link = new LinkEntity(); // Set the LinkEntity's properties. link.LinkCriteria = filter; // Set the linking entity to be the account. link.LinkFromEntityName = EntityName.account.ToString(); // Set the linking attribute to be the owninguser. link.LinkFromAttributeName = "owninguser"; // Set the attribute being linked to to be the systemuserid. link.LinkToAttributeName = "systemuserid"; // Set the entity being linked to to be the systemuser. link.LinkToEntityName = EntityName.systemuser.ToString(); // Create the query. QueryExpression query = new QueryExpression(); // Set the query's properties. query.EntityName = EntityName.account.ToString(); query.ColumnSet = cols; query.LinkEntities = new LinkEntity[] {link}; // Create the request object. RetrieveMultipleRequest retrieve = new RetrieveMultipleRequest(); // Set the request object's properties. retrieve.Query = query; // Execute the request. RetrieveMultipleResponse retrieved2 = (RetrieveMultipleResponse) service.Execute(retrieve);

66 Utilizzo di CrmService Esempio di codice per il controllo della duplicazione di un account
CrmService service = new CrmService(); service.Credentials = System.Net.CredentialCache.DefaultCredentials; QueryByAttribute attributeQuery = new QueryByAttribute(); attributeQuery.Attributes = new string [] {"name"}; attributeQuery.Values = new string [] {newAccountName}; attributeQuery.EntityName = EntityName.account.ToString(); RetrieveMultipleRequest retrieve = new RetrieveMultipleRequest(); retrieve.Query = attributeQuery; RetrieveMultipleResponse retrieved = (RetrieveMultipleResponse)service.Execute(retrieve); // Render the response to the caller if (retrieved.BusinessEntityCollection.BusinessEntities.Length > 0) { //duplicated found } else //duplicated NOT found

67 Utilizzo di CrmMetadataService Esempio di codice per ottenere due array di entità custom e non
// Retrieve the metadata and build two arrays, // one that contains core entities, // the other custom entities. MetadataService service = new MetadataService(); Metadata md = service.RetrieveMetadata(MetatDataFlag.Entities); ArrayList coreEntities = new ArrayList(); ArrayList customEntities = new ArrayList(); foreach (EntityMetadata em in md.Entities) { if (em.IsCustomEntity) customEntities.Add(em.name); else coreEntities.Add(em.name); }

68 Building powerful applications
DupDetection & Callout Integrazione con Windows Desktop Search Rss Feeds Creare nuovo cliente con nome esistente da profilo CRM admin (TODO Aprire CalloutSample2) Cliccare su WDS crm Monica (TODO Aprire C:\Inetpub\wwwroot\_custom\Search) Mostrare Rss Feeds cliccando XML

69 Reporting & BI

70 Analisi dei dati con strumenti familiari ed efficaci
Analisi del business immediata Report sui tuoi dati aggiornati “in-context” Pivot e grafici generati dinamicamente con Microsoft Excel Pianifica e distribuisci I report

71 Reportistica integrata / cruscotti

72 Accesso ai dati CRM da Office

73 Reportistica: riassumendo
Reportistica: riassumendo... Strumenti di reportistica per diversi profili Non più solo in area “Report” Report pre filtrabili contestuali (nelle form, liste o area reporting) Disponibili anche in Outlook Strumenti disponibili per diversi profili Viste – “My expiring cases”, “My accounts”, … Integrazione con Excel – PivotTable dinamiche SRS Reports – “Account Overview”, … Cruscotti aziendali con sharepoint Business Data Lookup Snap in per Office

74 Lesson: Creating Excel Reports
Static List Takes the records in the current view exports them to an Excel file. This file can then be saved and used like any Excel document. Dynamic List When “Dynamic list” is selected, there is an option to edit columns. Any other object attribute can be added to a column in the worksheet. The Dynamic List provides the option to enable automatic refresh of the data each time the report is opened or disable automatic refresh. The option to disable automatic refresh still allows users to manually refresh the data Dynamic Pivot Table Pivot tables provide powerful ways to manipulate a set of data. Learning to work with Pivot Tables can take some effort for the novice, but the many users who are already familiar with them can perform powerful analysis with them.

75 Report SRS: elementi chiave
Reporting Services Server Database Report Request Query on Filtered View Secure CRM Data Reporting Services Report Request

76 Lesson: Transition to SQL Reporting Services
Upgrade Crystal Enterprise is removed All reports deployed are backed up and stored on the server Options Customers can re-deploy the existing reports, if they own or want to purchase Crystal Enterprise. Reports will not be able to use the specialized Crystal driver shipped with previous versions of Microsoft CRM Data source of the report can be modified to use Microsoft CRM filtered views

77 Microsoft CRM Report Area
Administrative Tasks Provides users with sufficient privileges to: Upload or link reports to CRM Remove, rename existing reports Control where reports are displayed in Microsoft CRM Control how reports are categorized Set the default filter for reports that support default filters Microsoft CRM Reports Area does not provide control over who can view reports

78 Overview architettura

79 Integrazione con SQL Reporting Services
Report Server Usato come store sicuro dei report Più basso TCO Supporto per qualsiasi edizione di SQL Server SQL Reporting Services functionality Scheduling e Caching Delivery options “Export to PDF”

80 SQL Server Reporting Services
Secure reporting with integrated CRM security Open, extensible reporting solution Contextual reports with CRM features Improved interactivity Platform Services: This layer of the Microsoft CRM system design represents the entire set of server components that encompass the Microsoft CRM server architecture. Items like the core application security services and report generation engine within SQL Server, the native XML query engine within Microsoft CRM (called FetchXML), integration and routing across Exchange Server and native integration services with the CRM web services design and platform extensibility model. Key elements within this slide: Microsoft CRM 3.0 will introduce a shift in reporting strategy- away from Crystal Reports and to Microsoft’s SQL Server reporting services (SRS) reporting platform. SRS provides a secure reporting solution for businesses with integration to Microsoft CRM’s native security system (Filtered database views). In addition, SRS allows for greater extensibility, integration with the Microsoft CRM native forms and greatly improved end-user interactivity (drill-down, export to excel, etc).

81 Filtered Views Viste SQL che rispettano la sicurezza del CRM
Disponibili per tutte le entità Built off application views Accesso agli atributi CRM Lookups (id, name) Picklists (id, name) Dates (user’s time, UTC time) Accessibili a membri del “SQL Reporting Group”

82 Reportistica estensibile
Visualizzazione Show any report types inside CRM Integrazione lato client e server SAP, Excel, Pivotal, Business Objects… Utilizzo di soluzioni di reportistica esterne Build on top of Filtered Views SharePoint, Excel, Access, Business Objects …

83 Gestione dei report Gestione dei report (in CRM)
Create Update Delete Categorize Associate with UI Show any report types inside CRM Integration client and server side SAP, Excel, Pivotal, Business Objects… Bulk publish (PublishReports.exe) Bulk download (DownloadReports.exe)

84 Great reports Report dinamici con Excel Esempio di report con RS
Business Data Lookup Snap in Esempio di cruscotto con sharepoint TODO PREPARAZIONE (Loggare omino, testare da utente) Da opportunità mostrare pipeline in Excel Aprire CRM_SRS_reports e mostrare report Opportunità per account Mostrare sito vendite

85 Riassumendo Microsoft CRM V3.0:
Fornisce un insieme di funzionalità di estensione e integrazione che permette la creazione di potenti applicazioni di business Facilmente integrabile con applicazioni esterne attraverso Web services e XML Ricca development experience

86 Links utili Crm SDK GotDotNet Crm Sandbox Home
Downloadable Online GotDotNet Crm Sandbox Home “Microsoft Crm” Newsgroup “Microsoft Crm Developer” Newsgroup ”Microsoft Crm Deployment” Newsgroup Microsoft CRM DemoLab Blogs vari Mid Atlantic Microsoft CRM

87 Q & A mailto: mfisicar@microsoft.com
Microsoft CRM V3.0 Q & A mailto:

88 © 2004 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

89 Mapping from Version 1.2 For the most part, Microsoft CRM 3.0 SDK is backward compatible with previous versions. This means that you can include the old DLLs from the previous version and your code will still work using the old programming style. There are a few exceptions: Activities. CRMActivity and CRM proxy objects are not supported. Code written against these objects must be converted to the new programming model. Methods that create activities. This includes CRMSalesOrder.Cancel, CRMOpportunity.Lose, and CRMIncident.Close. Workflow. CRMProcess proxy object is no longer supported. It is recommended that all workflows be created using the Workflow Manager. Rich Client Sync. Use of the CRMRichClientSync proxy object is no longer supported. CRMCustomization. This class is no longer supported. Use the message InitializeFrom to transform entity instances. CRMSalesperson. This entity is no longer supported. Use systemuser instead. CRMAnswer. This entity is no longer supported. Teams security. Teams cannot own objects in Microsoft CRM 3.0. MakePrivate/MakePublic. These methods are no longer supported. Organization. The organization entity does not support Create, Delete, Enable, and Disable actions. Warning   Microsoft CRM V1.x APIs located in the assemblies Microsoft.Crm.Platform.Proxy, Microsoft.Crm.Platform.Types and name>/mscrmservices/*.srf are deprecated and are considered obsolete. This means that these APIs may not be supported in future versions of Microsoft CRM. You should avoid the use of Microsoft CRM V1.X APIs and you are strongly encouraged to migrate and develop your applications using the Web services that are described in this version of the Microsoft CRM 3.0 SDK and the accompanying documentation.

90 Personalizzazioni di Form Modifiche su IIS
Upgrade unsupported 1.2 a 3 Modifiche al DB Qualsiasi modifica diretta a tabelle viste sp (es campi aggiunti alla AccountBase) Integrazioni con DB Accesso diretto Personalizzazioni di Form Modifiche dirette a Aspx, js, xml, css etc Modifiche su IIS Sviluppo custom non previsto in SDK


Scaricare ppt "Gli strumenti di sviluppo e personalizzazione di Microsoft CRM 3.0"

Presentazioni simili


Annunci Google