CRM Developer Form Scripting. @DavidYack



Similar documents
CREATE EXACTLY THE MOBILE CRM YOU WANT

HTML Form Widgets. Review: HTML Forms. Review: CGI Programs

Adam Rauch Partner, LabKey Software Extending LabKey Server Part 1: Retrieving and Presenting Data

Tutorial JavaScript: Switching panels using a radio button

Filtered Views for Microsoft Dynamics CRM

Installing and Sending with DocuSign for NetSuite v2.2

Portals and Hosted Files

Course Information Course Number: IWT 1229 Course Name: Web Development and Design Foundation

CRM Migration Assistant Speeding your migration to CRM 2011

SizmekFeatures. HTML5JSSyncFeature

Table of Contents. Overview Supported Platforms Demos/Downloads Known Issues Note Included Files...

Course Syllabus Microsoft Dynamics CRM 4.0 Customization and Configuration (Elements of this syllabus are subject to change.)

Resco Mobile CRM Woodford (Rules Guide) Document version

How-To: Submitting PDF forms to SharePoint from custom websites

COURSE CONTENT FOR WINTER TRAINING ON Web Development using PHP & MySql

TUTORIAL: Marketing Automation Gold-Vision 7

Pass4Sure.MB2-701_90Q&A. MB2-701 Extending Microsoft Dynamics CRM 2013

Testing Tools using Visual Studio. Randy Pagels Sr. Developer Technology Specialist Microsoft Corporation

Sizmek Formats. IAB Mobile Pull. Build Guide

Dynamic Forms for SharePoint

Introducing Apache Pivot. Greg Brown, Todd Volkert 6/10/2010

CRM Rules! User Guide. Version Prepared October, 2012 By: David L. Carr, President, Visionary Software

8912A: Configuration & Customization in Microsoft Dynamics CRM 4.0

Developers Guide version 1.1

J j enterpririse. Oracle Application Express 3. Develop Native Oracle database-centric web applications quickly and easily with Oracle APEX

Microsoft Dynamics CRM2015 Fast Track for developers

Salesforce Customer Portal Implementation Guide

SuiteBuilder (Customization) Guide September 3, 2013 Version 2013 Release 2

MASTERTAG DEVELOPER GUIDE

CLASSROOM WEB DESIGNING COURSE

CRM Rules 2013 User Guide. Version Prepared Sept, 2014 By: David L. Carr President, Visionary Software

WP Popup Magic User Guide

Client SuiteScript Developer s Guide

Customization and Configuration in Microsoft Dynamics CRM 4.0

DIPLOMA IN WEBDEVELOPMENT

MiniBase. Custom View Tips & Tricks. Schoolwires Centricity 2.0

Developer Tutorial Version 1. 0 February 2015

MOC 20488B: Developing Microsoft SharePoint Server 2013 Core Solutions

Check list for web developers

Localizing dynamic websites created from open source content management systems

WebSphere Business Monitor V7.0 Script adapter lab

Qualtrics Question API

Building and Deploying Web Applications

SharePoint Form Field Assistant SPFF. Form Manipulations. Getting Started. Hide

BUILDING MULTILINGUAL WEBSITES WITH DRUPAL 7

NetFlow for SouthWare NetLink

T E C H N I C A L D O C U M E N T A T I O N. Intrexx 7.0 Update. Intrexx 7.0

Cleo Communications. CUEScript Training

DNNCentric Custom Form Creator. User Manual

Specify the location of an HTML control stored in the application repository. See Using the XPath search method, page 2.

IE Class Web Design Curriculum

OPENTABLE GROUP SEARCH MODULE GETTING STARTED ADD RESERVATIONS TO YOUR WEBSITE

IBM BPM V8.5 Standard Consistent Document Managment

IBM Unica emessage Version 8 Release 5 February 19, Transactional Administration Guide

Techniques and Tools for Rich Internet Applications Testing

Developing Microsoft SharePoint Server 2013 Core Solutions

Marketo Integration Setup Guide

HTML Forms and CONTROLS

Cofred Automated Payments Interface (API) Guide

Visualizing MongoDB Objects in Concept and Practice

php-crypto-params Documentation

Open CTI Developer's Guide

TIBCO Spotfire Business Author Essentials Quick Reference Guide. Table of contents:

Inspections Demo and User Guide

Category: Business Process and Integration Solution for Small Business and the Enterprise

A This panel lists all the IVR queues you have built so far. This is where you start the creation of a IVR

WebIOPi. Installation Walk-through Macros

Storing Merge Templates

SETTING UP SALESFORCE ORDERS FOR YOUR ORGANIZATION

Manage Workflows. Workflows and Workflow Actions

Google AdWords TM Conversion Tracking Guide

Load testing with. WAPT Cloud. Quick Start Guide

Performance Testing for Ajax Applications

Certified PHP/MySQL Web Developer Course

Module Google Remarketing + Dynamic

Art of Code Front-end Web Development Training Program

Using jquery and CSS to Gain Easy Wins in CiviCRM

EBOX Digital Content Management System (CMS) User Guide For Site Owners & Administrators

Tutorial: Building a Dojo Application using IBM Rational Application Developer Loan Payment Calculator

Release Notes Scribe Adapter for Microsoft Dynamics

Developing Microsoft SharePoint Server 2013 Advanced Solutions. Version: Demo. Page <<1/8>>

Startup Guide. Version 2.3.9

The Smart Forms Web Part allows you to quickly add new forms to SharePoint pages, here s how:

Opacus Outlook Addin v3.x User Guide

Embedded BI made easy

SAS Task Manager 2.2. User s Guide. SAS Documentation

To install Multifront you need to have familiarity with Internet Information Services (IIS), Microsoft.NET Framework and SQL Server 2008.

Order Manager Toolkit

WorldShare ILL Release Notes November 2013 Release

Using the vcenter Orchestrator Plug-In for vsphere Auto Deploy 1.0

FileMaker Server 14. Custom Web Publishing Guide

XTM Drupal Connector. A Translation Management Tool Plugin

How To Create A Website In Vablet (For Web) With Html And Html (For Html) On A Pc Or Mac) With A Web Browser (For Mac) On Your Computer Or Ipad Or Ipa (For Pc Or Ip

Transcription:

CRM Developer Form Scripting @DavidYack

Using Form Scripting Allows dynamic business rules to be implemented on forms Script can run in response to Form Events Form Script is uploaded and run from CRM Form Scripting implements rules specific to CRM Form presentation Form Scripting automates tasks to provide consistency and improved user experience Xrm.Page API provided to interact with CRM controlled Forms

Example Scripting Scenarios Field is only required when another field has a specific value Option Set list should only contain a subset of values Hide or Show Tabs, Sections and Fields based on other values Format Data e.g. Phone Number Custom validation of data content including stopping save of form

Form Events OnLoad OnSave OnChange TabStateChange OnReadyStateComplete

Developing Form Script Form Script is uploaded as a JavaScript web resource Each form then references the JavaScript library One JavaScript Web Resource can be shared across multiple forms Once Referenced events can be registered for the form and its fields

Demo Using Client Scripting Demo Time

Xrm.Page API JavaScript API for interacting with the CRM Form and associated data Xrm.Page is the only supported way to interact with the Form API has UI centric methods and data centric methods Type of form can limit what parts of the API is available for use Field must be on form for data to be available for scripting

Xrm.Page Object Model

Getting Attribute vs. Get Control Get by attribute name var titleattrib= Xrm.Page.getAttribute( snap_title"); Get all attributes var allattribs= Xrm.Page.getAttribute(); Get first control for attribute var titlecontrol = Xrm.Page.getControl( snap_title"); Get all controls for attribute var titlecontrols = Xrm.Page.getAttribute( snap_title").controls.get(); Get Attribute for Control var titleattribute = Xrm.Page.getControl( snap_title").getattribute();

Getting and Setting Values Getting an attribute value var titlevalue = Xrm.Page.getAttribute( snap_title").getvalue(); Setting an Attribute value Xrm.Page.getAttribute( snap_title").setvalue( Yellowstone Winter"); Checking if an Attribute has changed var titlechanged = Xrm.Page.getAttribute( snap_title").getisdirty(); Force a field to be required Xrm.Page.getAttribute( snap_title").setrequiredlevel("required");

Working with Controls Checking if a control is Visible var titlevisible = Xrm.Page.getControl( snap_title").getvisible(); Hide a control Xrm.Page.getControl( snap_title").setvisible(false); Disable a control Xrm.Page.getControl( snap_title").setdisabled(true); Set focus on a control Xrm.Page.getControl( snap_title").setfocus(); Set the label for a control Xrm.Page.getControl( snap_title").setlabel( Landscape Photo Title");

Working with Tabs and Sections Collapse a tab Xrm.Page.ui.tabs.get("general").setDisplayState("collapsed"); Show a tab Xrm.Page.ui.tabs.get("general").setVisible(true); Get the section for a control and hide it Xrm.Page.getControl( snap_title ).getparent().setvisible(false); Set focus to tab containing control Xrm.Page.getControl( snap_title ).getparent().getparent().setfocus();

Collection Methods foreach applies a delegate function to each item in the collection getlength returns the number of items in the collection get returns an array of items matching the parameters None returns all items in the collection String returns item where name matches string Number returns item at the index specified Delegate Function returns items that the delegate function returns true

Demo Using Attributes, Controls and Tabs Demo Time

Using the Client Context getclienturl provides a client side URL for accessing the CRM server from the client getuserid quickly get the GUID for the current user getuserroles GUID list for each role the user is part of getquerystringparameters array of key/value representing query string getuserlcid get language Id for the current user.

Working with Option Sets Getting options for an Option Set control var options = optionsetcontrol.getattribute().getoptions(); Clear all options currently configured for the display control optionsetcontrol.clearoptions(); Add only specific options back to the control list optionsetcontrol.addoption(option);

Demo Using Option sets Demo Time

Form Scripting Tips Any field involved in Hide/Show scripting should be hidden to start with Fields can be on forms multiple times Group fields that need to be hidden/shown into a common tab/section Fields must be on the form body to access their data or control properties

Wrapping Up Client Script can bring the CRM user experience to life Stick to supported use of the API for enforcing business rules and not for un-supported HTML manipulation