Scripting Sample Code
![]() |
[Applies to: Microsoft Dynamics CRM 4.0]
Find the latest SDK documentation: CRM 2015 SDK
This section provides examples of how to perform specific tasks using scripts.
In This Section
CrmService.Create Method Using JScript
Create new records using Microsoft Dynamics CRM Web services and JScript.
CrmService.Delete Method Using JScript
Delete records using Microsoft Dynamics CRM Web services and JScript.
CrmService.Execute Method Using JScript
Perform complex operations using Microsoft Dynamics CRM Web services and JScript.
CrmService.Fetch Method Using JScript
Retrieve records using Microsoft Dynamics CRM Web services and JScript.
CrmService.Retrieve Method Using JScript
Retrieve data from a record using Microsoft Dynamics CRM Web services and JScript.
CrmService.RetrieveMultiple Method Using JScript
Retrieve records using Microsoft Dynamics CRM Web services and JScript.
CrmService.Update Method Using JScript
Update records using Microsoft Dynamics CRM Web services and JScript.
Add Search Capability To A Form Using an IFrame
Create an IFRAME that performs a search based on a form field value.
Create Activity Record Templates
Configure buttons which open new forms for the same entity with different default data.
How to Control Update Access for a Field
Disable fields for users not authorized to edit them.
How to Find the Entity Type Code
Write a script to retrieve the entity type code.
How to Work with Lookup Form Controls
Set and retrieve data from a lookup control.
Use the window opener function.
Discusses different methods to set default values and includes a sample to set default values from form or field events.
Describes things to consider when validating data and includes a sample that shows how to set the value of a field by multiplying the values of two other fields.
Format telephone numbers to make them more readable.
Shows how to reference data in several different types of fields in a Microsoft Dynamics CRM form.
Retrieving Data from Related Records
Shows how to reference data from related records using XMLHttp requests to the Microsoft Dynamics Web service and JScript using the RetrieveMultiple message in client-side code.
© 2010 Microsoft Corporation. All rights reserved.
