Download Microsoft CRM 2011 SDK - SDK voorpagina - CRM Performance - CRM Hosting
Heeft u vragen? Bel ons op 030 800 8008

Contains the data needed to create a record.

Namespace: Microsoft.Xrm.Sdk.Messages
Assembly: Microsoft.Xrm.Sdk (in microsoft.xrm.sdk.dll)

Usage

Visual Basic

Syntax

Visual Basic
<DataContractAttribute(Namespace:="http://schemas.microsoft.com/xrm/2011/Contracts")> _
Public NotInheritable Class CreateRequest
	Inherits OrganizationRequest
C#
[DataContractAttribute(Namespace="http://schemas.microsoft.com/xrm/2011/Contracts")] 
public sealed class CreateRequest : OrganizationRequest
C++
J#
JScript
DataContractAttribute(Namespace="http://schemas.microsoft.com/xrm/2011/Contracts") 
public final class CreateRequest extends OrganizationRequest

Example

The following example demonstrates how to use this message. For this sample you must already have connected to the server to get an IOrganizationService interface. For the complete sample, see the link below.

C#
//Encodes the Web Resource File
static public string getEncodedFileContents(String pathToFile)
{
    FileStream fs = new FileStream(pathToFile, FileMode.Open, FileAccess.Read);
    byte[] binaryData = new byte[fs.Length];
    long bytesRead = fs.Read(binaryData, 0, (int)fs.Length);
    fs.Close();
    return System.Convert.ToBase64String(binaryData, 0, binaryData.Length);
}

Remarks

Message Availability

This message works either when connected to the server or offline.

Not all entity types support this message offline. See Supported Entities below.

Usage

Pass an instance of this class to the Execute method.

This message supports one or more optional parameters. For more information, see Pass Optional Parameters in Messages.

Privileges and Access Rights

To perform this action, the caller must have privileges on the entity specified in the entity parameter. For a list of the privileges required, see Create Privileges.

Notes for Callers

This message creates a record with related records in one transaction. For a less complex method that creates a single record, use the Create method.

By default the caller will become the owner for the new record. For this to work, the caller must have both Create and Read privileges for the entity. For more information, see Privileges by Entity. Alternatively, you can set the ownerid property to the ID of another user.

Supported Entities

You can use this method to create any record of an entity that supports the Create message, including custom entities.

The following table shows which default entities support this message and whether the message is available connected to the server (Server), disconnected from the server (Offline) or both (Both).

Availability Entity

Both

account

Both

activitymimeattachment

Both

annotation

Both

annualfiscalcalendar

Both

appointment

Both

asyncoperation

Both

attributemap

Both

businessunit

Both

businessunitnewsarticle

Both

calendar

Both

campaign

Both

campaignactivity

Both

campaignresponse

Both

columnmapping

Both

competitor

Both

connection

Both

connectionrole

Both

connectionroleobjecttypecode

Both

constraintbasedgroup

Both

contact

Both

contract

Both

contractdetail

Both

contracttemplate

Both

customeraddress

Both

customeropportunityrole

Both

customerrelationship

Both

discount

Both

discounttype

Both

duplicaterule

Both

duplicaterulecondition

Both

email

Both

equipment

Both

fax

Both

fieldpermission

Both

fieldsecurityprofile

Both

fixedmonthlyfiscalcalendar

Both

goal

Both

goalrollupquery

Both

import

Both

importdata

Both

importentitymapping

Both

importfile

Both

importjob

Both

importmap

Both

incident

Both

incidentresolution

Both

invoice

Both

invoicedetail

Both

isvconfig

Both

kbarticle

Both

kbarticlecomment

Both

kbarticletemplate

Both

lead

Both

letter

Both

list

Both

lookupmapping

Both

mailmergetemplate

Both

metric

Both

monthlyfiscalcalendar

Both

opportunity

Both

opportunityclose

Both

opportunityproduct

Both

orderclose

Both

organizationui

Both

ownermapping

Both

phonecall

Both

picklistmapping

Both

pluginassembly

Both

plugintype

Both

pricelevel

Both

principalobjectattributeaccess

Both

processsession

Both

product

Both

productpricelevel

Both

publisher

Both

publisheraddress

Both

quarterlyfiscalcalendar

Both

queue

Both

queueitem

Both

quote

Both

quoteclose

Both

quotedetail

Both

recurrencerule

Both

recurringappointmentmaster

Both

relationshiprole

Both

relationshiprolemap

Both

report

Both

reportcategory

Both

reportentity

Both

reportvisibility

Both

resourcespec

Both

role

Both

rollupfield

Both

salesliterature

Both

salesliteratureitem

Both

salesorder

Both

salesorderdetail

Both

savedquery

Both

savedqueryvisualization

Both

sdkmessageprocessingstep

Both

sdkmessageprocessingstepimage

Both

sdkmessageprocessingstepsecureconfig

Both

semiannualfiscalcalendar

Both

service

Both

serviceappointment

Both

serviceendpoint

Both

sharepointdocumentlocation

Both

sharepointsite

Both

site

Both

solution

Both

subject

Both

systemform

Both

systemuser

Both

task

Both

team

Both

template

Both

territory

Both

transactioncurrency

Both

transformationmapping

Both

transformationparametermapping

Both

uom

Both

uomschedule

Both

userentityinstancedata

Both

userentityuisettings

Both

userform

Both

userquery

Both

userqueryvisualization

Both

visualizationmodule

Both

webresource

Both

webwizard

Both

wizardaccessprivilege

Both

wizardpage

Both

workflow

Both

workflowdependency

Both

workflowlog


Inheritance Hierarchy

System.Object
Microsoft.Xrm.Sdk.OrganizationRequest
Microsoft.Xrm.Sdk.Messages.CreateRequest

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2008

Target Platforms

Windows 7 (All Versions), Windows Vista (All Versions), Windows XP Professional SP2, Windows XP Home Edition SP2, Windows XP Media Center Edition SP2, Windows XP Tablet PC Edition SP2

Change History

See Also


© Resultondemand.nl   Hosting -  Performance -  Upgrade -  Nieuw -  Over ons -  Contact -  CRM 2011 proberen

2AT - Netricity - CRM boeken

Microsoft Partner? Bekijk hier ons partner aanbod