SlideShare a Scribd company logo
1 of 10
MICROSOFT DYNAMICS CRM 2016
NEW CLIENT SIDE FEATURES
The New Client Scripting Method
Introduced in Microsoft Dynamics
CRM 2016 with the release that we
can use make to user experience and
interactive while data entered into the
crm forms.
METHOD – GETVALUE
• This method was previously available only for attribute
collection and using it we could get field value after the field
was updated and while the cursor was unfocused from that
field. Now, we can capture value of field as early as when users
start entering value in field. We can use this method as shown
below:
Xrm.Page.getControl(field name).getValue();
Where we want the user to enter value as per our specific pattern or regular
expression, we can use code mentioned below:
function OnfieldKeyPress() {
var fieldValue = Xrm.Page.getControl(“field name
here”).getValue().toString().replace(/[^0-9]/g, “”);
Xrm.Page.getAttribute(“field name here”).setValue(fieldValue);
}
This method will work only if we call this on a Keypress event. So let’s
first understand how to call a function on Keypress event for a text field.
Note:
JScript Code : OnLoad Event
EVENT -KEYPRESS
The following three Keypress methods are added for 2016 version:
1) addOnKeyPress()
This is used to attach a function with a Keypress event:
Xrm.Page.getControl (fieldname).addOnKeyPress(function name);
If we add this statement in function which is called at the loading of the form, then
OnFieldKeyPress function will be attached with Keypress event of field.
2) removeOnKeyPress()
This is used to remove/detach a function that is attached with a Keypress event:
Xrm.Page.getControl(fieldname).removeOnKeyPress(function
name);
3) fireOnKeyPress()
This is used to call Keypress event handler for text or a number field.
Xrm.Page.getControl(field name).fireOnKeyPress();
So addOnKeyPress and removeOnKeyPress basically attach or delete already
attached function with Keypress event while fireOnKeyPress enables Keypress
event for text or number fields.
Example
New key Press Method on telephone number field
First we will setup a function on the new addOnKeyPress event for the main
telephone field.
Xrm.Page.getControl('telephone1').addOnKeyPress(function() { });
Then we will retrieve the value from the main telephone field to get the keys that
the user inputted.
var userInput = Xrm.Page.getControl('telephone1').getValue();
Then we will build a regex to replace any of the inputted keys that are not “(“, “)”,
“-“, or a number.
userInput = userInput.replace(/[^d-()]+/g, '');
Lastly, we will replace the main telephone value with the new clean version of the
user’s input
Xrm.Page.getAttribute('telephone1').setValue(userInput);
It’s just that easy! Now if a user presses an invalid character in the main
telephone field, it will automatically delete the character so the field will not be
saved with invalid data.
JavaScript Code
SetKeyPressMethodOnTelephoneNumber = function () {
Xrm.Page.getControl(‘telephone1’).addOnKeyPress(function () {
var userInput = Xrm.Page.getControl(‘telephone1’).getValue();
userInput = userInput.replace(/[^d-()]+/g, ”);
Xrm.Page.getAttribute(‘telephone1’).setValue(userInput);
});
}
Call these Methods on Form load Event
Note:
Thank You
K.Naveen Kumar
Microsoft Dynamics CRM Technical Consultant

More Related Content

What's hot

What's hot (7)

Dti2143 lab sheet 9
Dti2143 lab sheet 9Dti2143 lab sheet 9
Dti2143 lab sheet 9
 
Piecewise Functions
Piecewise FunctionsPiecewise Functions
Piecewise Functions
 
Cse 121 presentation on matrix [autosaved]
Cse 121 presentation on matrix [autosaved]Cse 121 presentation on matrix [autosaved]
Cse 121 presentation on matrix [autosaved]
 
Graphing Inequalities Example
Graphing Inequalities ExampleGraphing Inequalities Example
Graphing Inequalities Example
 
Sketching derivatives
Sketching derivativesSketching derivatives
Sketching derivatives
 
Render
RenderRender
Render
 
CHAPTER 3 - Lesson B
CHAPTER 3 - Lesson BCHAPTER 3 - Lesson B
CHAPTER 3 - Lesson B
 

Viewers also liked

Make a positive change
Make a positive changeMake a positive change
Make a positive changebhamraps
 
Stockholm symposium pauwels 2008
Stockholm symposium pauwels 2008Stockholm symposium pauwels 2008
Stockholm symposium pauwels 2008Lieven J.R. Pauwels
 
要求獲得過程の観測と評価に関するツールの開発
要求獲得過程の観測と評価に関するツールの開発要求獲得過程の観測と評価に関するツールの開発
要求獲得過程の観測と評価に関するツールの開発Michitaro Okano
 
Reflections on Team Building at Land 2013 Jul 31
Reflections on Team Building at Land 2013 Jul 31Reflections on Team Building at Land 2013 Jul 31
Reflections on Team Building at Land 2013 Jul 31Robin Levesque, MA, PMP, RI
 
Business rulers in Microsoft Dynamics CRM 2013
Business rulers in Microsoft Dynamics CRM 2013Business rulers in Microsoft Dynamics CRM 2013
Business rulers in Microsoft Dynamics CRM 2013Naveen Kumar
 
Canadian Cancer Society, Ontario Division - Impact Report 2009-10
Canadian Cancer Society, Ontario Division - Impact Report 2009-10Canadian Cancer Society, Ontario Division - Impact Report 2009-10
Canadian Cancer Society, Ontario Division - Impact Report 2009-10Canadian Cancer Society
 
The Outer Planets
The Outer PlanetsThe Outer Planets
The Outer Planetsdwinter1
 
Why Upgrade from Microsoft CRM 2011 to CRM 2015?
Why Upgrade from Microsoft CRM 2011 to CRM 2015?Why Upgrade from Microsoft CRM 2011 to CRM 2015?
Why Upgrade from Microsoft CRM 2011 to CRM 2015?C5 Insight
 
Salesforce Case Management with Canadian Cancer Society, Salesforce.org, and ...
Salesforce Case Management with Canadian Cancer Society, Salesforce.org, and ...Salesforce Case Management with Canadian Cancer Society, Salesforce.org, and ...
Salesforce Case Management with Canadian Cancer Society, Salesforce.org, and ...Heller Consulting
 
Adaptive Case Management Awards Ceremony 2016
Adaptive Case Management Awards Ceremony 2016Adaptive Case Management Awards Ceremony 2016
Adaptive Case Management Awards Ceremony 2016Future Strategies Inc.
 
Plugin vs Workflow in Microsoft Dynamics CRM
Plugin vs Workflow in Microsoft Dynamics CRMPlugin vs Workflow in Microsoft Dynamics CRM
Plugin vs Workflow in Microsoft Dynamics CRMAli Sharifi
 
30% - 60% of CRM Projects Fail
30% - 60% of CRM Projects Fail30% - 60% of CRM Projects Fail
30% - 60% of CRM Projects FailC5 Insight
 
Getting started with Microsoft dynamics crm 2016
Getting started with Microsoft dynamics crm 2016Getting started with Microsoft dynamics crm 2016
Getting started with Microsoft dynamics crm 2016Firoz Muhammed
 
Interview Questions For Microsoft Dynamics CRM
Interview Questions For Microsoft Dynamics CRMInterview Questions For Microsoft Dynamics CRM
Interview Questions For Microsoft Dynamics CRMKumari Warsha Goel
 

Viewers also liked (19)

Make a positive change
Make a positive changeMake a positive change
Make a positive change
 
Stockholm symposium pauwels 2008
Stockholm symposium pauwels 2008Stockholm symposium pauwels 2008
Stockholm symposium pauwels 2008
 
20160914152030857
2016091415203085720160914152030857
20160914152030857
 
要求獲得過程の観測と評価に関するツールの開発
要求獲得過程の観測と評価に関するツールの開発要求獲得過程の観測と評価に関するツールの開発
要求獲得過程の観測と評価に関するツールの開発
 
Reflections on Team Building at Land 2013 Jul 31
Reflections on Team Building at Land 2013 Jul 31Reflections on Team Building at Land 2013 Jul 31
Reflections on Team Building at Land 2013 Jul 31
 
TheZaeList Deck
TheZaeList DeckTheZaeList Deck
TheZaeList Deck
 
Business rulers in Microsoft Dynamics CRM 2013
Business rulers in Microsoft Dynamics CRM 2013Business rulers in Microsoft Dynamics CRM 2013
Business rulers in Microsoft Dynamics CRM 2013
 
งานคอม
งานคอมงานคอม
งานคอม
 
Nurse-Client Relationship Rating Scale
Nurse-Client Relationship Rating ScaleNurse-Client Relationship Rating Scale
Nurse-Client Relationship Rating Scale
 
Canadian Cancer Society, Ontario Division - Impact Report 2009-10
Canadian Cancer Society, Ontario Division - Impact Report 2009-10Canadian Cancer Society, Ontario Division - Impact Report 2009-10
Canadian Cancer Society, Ontario Division - Impact Report 2009-10
 
The Outer Planets
The Outer PlanetsThe Outer Planets
The Outer Planets
 
Why Upgrade from Microsoft CRM 2011 to CRM 2015?
Why Upgrade from Microsoft CRM 2011 to CRM 2015?Why Upgrade from Microsoft CRM 2011 to CRM 2015?
Why Upgrade from Microsoft CRM 2011 to CRM 2015?
 
Salesforce Case Management with Canadian Cancer Society, Salesforce.org, and ...
Salesforce Case Management with Canadian Cancer Society, Salesforce.org, and ...Salesforce Case Management with Canadian Cancer Society, Salesforce.org, and ...
Salesforce Case Management with Canadian Cancer Society, Salesforce.org, and ...
 
Adaptive Case Management Awards Ceremony 2016
Adaptive Case Management Awards Ceremony 2016Adaptive Case Management Awards Ceremony 2016
Adaptive Case Management Awards Ceremony 2016
 
Plugin vs Workflow in Microsoft Dynamics CRM
Plugin vs Workflow in Microsoft Dynamics CRMPlugin vs Workflow in Microsoft Dynamics CRM
Plugin vs Workflow in Microsoft Dynamics CRM
 
30% - 60% of CRM Projects Fail
30% - 60% of CRM Projects Fail30% - 60% of CRM Projects Fail
30% - 60% of CRM Projects Fail
 
Getting started with Microsoft dynamics crm 2016
Getting started with Microsoft dynamics crm 2016Getting started with Microsoft dynamics crm 2016
Getting started with Microsoft dynamics crm 2016
 
Interview Questions For Microsoft Dynamics CRM
Interview Questions For Microsoft Dynamics CRMInterview Questions For Microsoft Dynamics CRM
Interview Questions For Microsoft Dynamics CRM
 
Patanjali 2
Patanjali 2Patanjali 2
Patanjali 2
 

Similar to New client side features - Microsoft Dynamics CRM 2016

Flex 4 components from the firehose
Flex 4 components from the firehoseFlex 4 components from the firehose
Flex 4 components from the firehosemichael.labriola
 
Flex 4 Components
Flex 4 ComponentsFlex 4 Components
Flex 4 Componentspaul51
 
Need to revise working code below,A good design means the applicat.pdf
Need to revise working code below,A good design means the applicat.pdfNeed to revise working code below,A good design means the applicat.pdf
Need to revise working code below,A good design means the applicat.pdfarchgeetsenterprises
 
Make sure to make a copy of the Google Doc for this lab into.pdf
Make sure to make a copy of the Google Doc for this lab into.pdfMake sure to make a copy of the Google Doc for this lab into.pdf
Make sure to make a copy of the Google Doc for this lab into.pdfadityastores21
 
Practicalfileofvb workshop
Practicalfileofvb workshopPracticalfileofvb workshop
Practicalfileofvb workshopdhi her
 
Sap solution manager change request management
Sap solution manager change request managementSap solution manager change request management
Sap solution manager change request managementdryday sunny
 
C# Advanced L02-Operator Overloading+Indexers+UD Conversion
C# Advanced L02-Operator Overloading+Indexers+UD ConversionC# Advanced L02-Operator Overloading+Indexers+UD Conversion
C# Advanced L02-Operator Overloading+Indexers+UD ConversionMohammad Shaker
 
Flex Maniacs 2007
Flex Maniacs 2007Flex Maniacs 2007
Flex Maniacs 2007rtretola
 
Progamming Primer Polymorphism (Method Overloading) VB
Progamming Primer Polymorphism (Method Overloading) VBProgamming Primer Polymorphism (Method Overloading) VB
Progamming Primer Polymorphism (Method Overloading) VBsunmitraeducation
 
srcCommissionCalculation.javasrcCommissionCalculation.javaimpo.docx
srcCommissionCalculation.javasrcCommissionCalculation.javaimpo.docxsrcCommissionCalculation.javasrcCommissionCalculation.javaimpo.docx
srcCommissionCalculation.javasrcCommissionCalculation.javaimpo.docxrafbolet0
 
Open microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutletOpen microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutletMitchinson
 
in C++ Design a class named Employee The class should keep .pdf
in C++ Design a class named Employee The class should keep .pdfin C++ Design a class named Employee The class should keep .pdf
in C++ Design a class named Employee The class should keep .pdfadithyaups
 
Google website call conversion (WCC) tracking
Google website call conversion (WCC) tracking Google website call conversion (WCC) tracking
Google website call conversion (WCC) tracking Etietop Demas
 
Windows phone 7 series
Windows phone 7 seriesWindows phone 7 series
Windows phone 7 seriesopenbala
 
commission1Application.javacommission1Application.javaimport.docx
commission1Application.javacommission1Application.javaimport.docxcommission1Application.javacommission1Application.javaimport.docx
commission1Application.javacommission1Application.javaimport.docxmonicafrancis71118
 
Citrix Mfcom Programming For Administrators
Citrix Mfcom Programming For AdministratorsCitrix Mfcom Programming For Administrators
Citrix Mfcom Programming For AdministratorsVishal Ganeriwala
 

Similar to New client side features - Microsoft Dynamics CRM 2016 (20)

Flex 4 components from the firehose
Flex 4 components from the firehoseFlex 4 components from the firehose
Flex 4 components from the firehose
 
Flex 4 Components
Flex 4 ComponentsFlex 4 Components
Flex 4 Components
 
Robotlegs Extensions
Robotlegs ExtensionsRobotlegs Extensions
Robotlegs Extensions
 
Need to revise working code below,A good design means the applicat.pdf
Need to revise working code below,A good design means the applicat.pdfNeed to revise working code below,A good design means the applicat.pdf
Need to revise working code below,A good design means the applicat.pdf
 
Make sure to make a copy of the Google Doc for this lab into.pdf
Make sure to make a copy of the Google Doc for this lab into.pdfMake sure to make a copy of the Google Doc for this lab into.pdf
Make sure to make a copy of the Google Doc for this lab into.pdf
 
Practicalfileofvb workshop
Practicalfileofvb workshopPracticalfileofvb workshop
Practicalfileofvb workshop
 
Sap solution manager change request management
Sap solution manager change request managementSap solution manager change request management
Sap solution manager change request management
 
C# Advanced L02-Operator Overloading+Indexers+UD Conversion
C# Advanced L02-Operator Overloading+Indexers+UD ConversionC# Advanced L02-Operator Overloading+Indexers+UD Conversion
C# Advanced L02-Operator Overloading+Indexers+UD Conversion
 
Flex Maniacs 2007
Flex Maniacs 2007Flex Maniacs 2007
Flex Maniacs 2007
 
Progamming Primer Polymorphism (Method Overloading) VB
Progamming Primer Polymorphism (Method Overloading) VBProgamming Primer Polymorphism (Method Overloading) VB
Progamming Primer Polymorphism (Method Overloading) VB
 
srcCommissionCalculation.javasrcCommissionCalculation.javaimpo.docx
srcCommissionCalculation.javasrcCommissionCalculation.javaimpo.docxsrcCommissionCalculation.javasrcCommissionCalculation.javaimpo.docx
srcCommissionCalculation.javasrcCommissionCalculation.javaimpo.docx
 
Open microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutletOpen microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutlet
 
in C++ Design a class named Employee The class should keep .pdf
in C++ Design a class named Employee The class should keep .pdfin C++ Design a class named Employee The class should keep .pdf
in C++ Design a class named Employee The class should keep .pdf
 
C programming session5
C programming  session5C programming  session5
C programming session5
 
Google website call conversion (WCC) tracking
Google website call conversion (WCC) tracking Google website call conversion (WCC) tracking
Google website call conversion (WCC) tracking
 
Java script
Java scriptJava script
Java script
 
Windows phone 7 series
Windows phone 7 seriesWindows phone 7 series
Windows phone 7 series
 
Vb6.0 intro
Vb6.0 introVb6.0 intro
Vb6.0 intro
 
commission1Application.javacommission1Application.javaimport.docx
commission1Application.javacommission1Application.javaimport.docxcommission1Application.javacommission1Application.javaimport.docx
commission1Application.javacommission1Application.javaimport.docx
 
Citrix Mfcom Programming For Administrators
Citrix Mfcom Programming For AdministratorsCitrix Mfcom Programming For Administrators
Citrix Mfcom Programming For Administrators
 

More from Naveen Kumar

Microsoft SQL Server 2016
Microsoft SQL Server 2016 Microsoft SQL Server 2016
Microsoft SQL Server 2016 Naveen Kumar
 
Service Analysis - Microsoft Dynamics CRM 2016 Customer Service
Service Analysis - Microsoft Dynamics CRM 2016 Customer ServiceService Analysis - Microsoft Dynamics CRM 2016 Customer Service
Service Analysis - Microsoft Dynamics CRM 2016 Customer ServiceNaveen Kumar
 
Email Router Configuration - Gmail and microsoft dynamics crm 2016 online int...
Email Router Configuration - Gmail and microsoft dynamics crm 2016 online int...Email Router Configuration - Gmail and microsoft dynamics crm 2016 online int...
Email Router Configuration - Gmail and microsoft dynamics crm 2016 online int...Naveen Kumar
 
Microsoft Dynamics CRM Multi - Tier Architecture
Microsoft Dynamics CRM Multi - Tier ArchitectureMicrosoft Dynamics CRM Multi - Tier Architecture
Microsoft Dynamics CRM Multi - Tier ArchitectureNaveen Kumar
 
Marketing Automation - Part 3
Marketing Automation - Part 3Marketing Automation - Part 3
Marketing Automation - Part 3Naveen Kumar
 
Marketing Automation - Part 2
Marketing Automation - Part 2Marketing Automation - Part 2
Marketing Automation - Part 2Naveen Kumar
 
Marketing Automation - Part 1
Marketing Automation - Part 1Marketing Automation - Part 1
Marketing Automation - Part 1Naveen Kumar
 
Sales force automation - Part 4
Sales force automation - Part 4Sales force automation - Part 4
Sales force automation - Part 4Naveen Kumar
 
Sales force automation - Part 3
Sales force automation - Part 3Sales force automation - Part 3
Sales force automation - Part 3Naveen Kumar
 
Sales force automation - Part 2
Sales force automation  - Part 2 Sales force automation  - Part 2
Sales force automation - Part 2 Naveen Kumar
 
Business process flows presentation
Business process flows presentationBusiness process flows presentation
Business process flows presentationNaveen Kumar
 
Part 3 - DNS Configuration (IFD)
Part 3 - DNS Configuration (IFD)Part 3 - DNS Configuration (IFD)
Part 3 - DNS Configuration (IFD)Naveen Kumar
 
Part 2 - Setup ADFS (Active Directory Federation Service)
Part 2 - Setup ADFS (Active Directory Federation Service)Part 2 - Setup ADFS (Active Directory Federation Service)
Part 2 - Setup ADFS (Active Directory Federation Service)Naveen Kumar
 
Part 1 - Binding Certificates (IFD)
 Part 1 - Binding Certificates (IFD) Part 1 - Binding Certificates (IFD)
Part 1 - Binding Certificates (IFD)Naveen Kumar
 
Unified Service Desk - Part 3
Unified Service Desk  - Part 3Unified Service Desk  - Part 3
Unified Service Desk - Part 3Naveen Kumar
 
Unified service desk - Part 1
Unified service desk - Part 1Unified service desk - Part 1
Unified service desk - Part 1Naveen Kumar
 
New Feature in CRM 2016
New Feature in CRM 2016New Feature in CRM 2016
New Feature in CRM 2016Naveen Kumar
 
Customizing document templates
Customizing document templates Customizing document templates
Customizing document templates Naveen Kumar
 
Microsoft dynamics crm 2011 installation
Microsoft dynamics crm 2011 installation Microsoft dynamics crm 2011 installation
Microsoft dynamics crm 2011 installation Naveen Kumar
 
Sitemap in Microsoft Dynamics CRM 2011/2013
Sitemap in Microsoft Dynamics CRM 2011/2013Sitemap in Microsoft Dynamics CRM 2011/2013
Sitemap in Microsoft Dynamics CRM 2011/2013Naveen Kumar
 

More from Naveen Kumar (20)

Microsoft SQL Server 2016
Microsoft SQL Server 2016 Microsoft SQL Server 2016
Microsoft SQL Server 2016
 
Service Analysis - Microsoft Dynamics CRM 2016 Customer Service
Service Analysis - Microsoft Dynamics CRM 2016 Customer ServiceService Analysis - Microsoft Dynamics CRM 2016 Customer Service
Service Analysis - Microsoft Dynamics CRM 2016 Customer Service
 
Email Router Configuration - Gmail and microsoft dynamics crm 2016 online int...
Email Router Configuration - Gmail and microsoft dynamics crm 2016 online int...Email Router Configuration - Gmail and microsoft dynamics crm 2016 online int...
Email Router Configuration - Gmail and microsoft dynamics crm 2016 online int...
 
Microsoft Dynamics CRM Multi - Tier Architecture
Microsoft Dynamics CRM Multi - Tier ArchitectureMicrosoft Dynamics CRM Multi - Tier Architecture
Microsoft Dynamics CRM Multi - Tier Architecture
 
Marketing Automation - Part 3
Marketing Automation - Part 3Marketing Automation - Part 3
Marketing Automation - Part 3
 
Marketing Automation - Part 2
Marketing Automation - Part 2Marketing Automation - Part 2
Marketing Automation - Part 2
 
Marketing Automation - Part 1
Marketing Automation - Part 1Marketing Automation - Part 1
Marketing Automation - Part 1
 
Sales force automation - Part 4
Sales force automation - Part 4Sales force automation - Part 4
Sales force automation - Part 4
 
Sales force automation - Part 3
Sales force automation - Part 3Sales force automation - Part 3
Sales force automation - Part 3
 
Sales force automation - Part 2
Sales force automation  - Part 2 Sales force automation  - Part 2
Sales force automation - Part 2
 
Business process flows presentation
Business process flows presentationBusiness process flows presentation
Business process flows presentation
 
Part 3 - DNS Configuration (IFD)
Part 3 - DNS Configuration (IFD)Part 3 - DNS Configuration (IFD)
Part 3 - DNS Configuration (IFD)
 
Part 2 - Setup ADFS (Active Directory Federation Service)
Part 2 - Setup ADFS (Active Directory Federation Service)Part 2 - Setup ADFS (Active Directory Federation Service)
Part 2 - Setup ADFS (Active Directory Federation Service)
 
Part 1 - Binding Certificates (IFD)
 Part 1 - Binding Certificates (IFD) Part 1 - Binding Certificates (IFD)
Part 1 - Binding Certificates (IFD)
 
Unified Service Desk - Part 3
Unified Service Desk  - Part 3Unified Service Desk  - Part 3
Unified Service Desk - Part 3
 
Unified service desk - Part 1
Unified service desk - Part 1Unified service desk - Part 1
Unified service desk - Part 1
 
New Feature in CRM 2016
New Feature in CRM 2016New Feature in CRM 2016
New Feature in CRM 2016
 
Customizing document templates
Customizing document templates Customizing document templates
Customizing document templates
 
Microsoft dynamics crm 2011 installation
Microsoft dynamics crm 2011 installation Microsoft dynamics crm 2011 installation
Microsoft dynamics crm 2011 installation
 
Sitemap in Microsoft Dynamics CRM 2011/2013
Sitemap in Microsoft Dynamics CRM 2011/2013Sitemap in Microsoft Dynamics CRM 2011/2013
Sitemap in Microsoft Dynamics CRM 2011/2013
 

Recently uploaded

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 

Recently uploaded (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 

New client side features - Microsoft Dynamics CRM 2016

  • 1. MICROSOFT DYNAMICS CRM 2016 NEW CLIENT SIDE FEATURES
  • 2. The New Client Scripting Method Introduced in Microsoft Dynamics CRM 2016 with the release that we can use make to user experience and interactive while data entered into the crm forms.
  • 3. METHOD – GETVALUE • This method was previously available only for attribute collection and using it we could get field value after the field was updated and while the cursor was unfocused from that field. Now, we can capture value of field as early as when users start entering value in field. We can use this method as shown below: Xrm.Page.getControl(field name).getValue();
  • 4. Where we want the user to enter value as per our specific pattern or regular expression, we can use code mentioned below: function OnfieldKeyPress() { var fieldValue = Xrm.Page.getControl(“field name here”).getValue().toString().replace(/[^0-9]/g, “”); Xrm.Page.getAttribute(“field name here”).setValue(fieldValue); } This method will work only if we call this on a Keypress event. So let’s first understand how to call a function on Keypress event for a text field. Note: JScript Code : OnLoad Event
  • 5. EVENT -KEYPRESS The following three Keypress methods are added for 2016 version: 1) addOnKeyPress() This is used to attach a function with a Keypress event: Xrm.Page.getControl (fieldname).addOnKeyPress(function name); If we add this statement in function which is called at the loading of the form, then OnFieldKeyPress function will be attached with Keypress event of field.
  • 6. 2) removeOnKeyPress() This is used to remove/detach a function that is attached with a Keypress event: Xrm.Page.getControl(fieldname).removeOnKeyPress(function name); 3) fireOnKeyPress() This is used to call Keypress event handler for text or a number field. Xrm.Page.getControl(field name).fireOnKeyPress();
  • 7. So addOnKeyPress and removeOnKeyPress basically attach or delete already attached function with Keypress event while fireOnKeyPress enables Keypress event for text or number fields. Example New key Press Method on telephone number field First we will setup a function on the new addOnKeyPress event for the main telephone field. Xrm.Page.getControl('telephone1').addOnKeyPress(function() { });
  • 8. Then we will retrieve the value from the main telephone field to get the keys that the user inputted. var userInput = Xrm.Page.getControl('telephone1').getValue(); Then we will build a regex to replace any of the inputted keys that are not “(“, “)”, “-“, or a number. userInput = userInput.replace(/[^d-()]+/g, ''); Lastly, we will replace the main telephone value with the new clean version of the user’s input
  • 9. Xrm.Page.getAttribute('telephone1').setValue(userInput); It’s just that easy! Now if a user presses an invalid character in the main telephone field, it will automatically delete the character so the field will not be saved with invalid data. JavaScript Code SetKeyPressMethodOnTelephoneNumber = function () { Xrm.Page.getControl(‘telephone1’).addOnKeyPress(function () { var userInput = Xrm.Page.getControl(‘telephone1’).getValue(); userInput = userInput.replace(/[^d-()]+/g, ”); Xrm.Page.getAttribute(‘telephone1’).setValue(userInput); }); } Call these Methods on Form load Event Note:
  • 10. Thank You K.Naveen Kumar Microsoft Dynamics CRM Technical Consultant