Tuesday, December 22, 2009

How to init Value on Server side

This example contain how to init all CRM Values:
CrmDateTime lDateTime = new CrmDateTime("2009/8/27T17:00:00");

CrmBoolean lBoolean = new CrmBoolean(true);

Picklist lList = new Picklist(1);

CrmDecimal lDec = new CrmDecimal(10.1);

CrmFloat lfloat = new CrmFloat(10.2);

CrmNumber lNumber = new CrmNumber(10);

Lookup oSys = new Lookup("systemuser", userId);

Owner owner = new Owner("systemuser", systemUserId);

Status lStatus = new Status(1);

EntityNameReference oReference = new EntityNameReference("systemuser");

Key key = new Key(userId);

CrmMoney lMoney = new CrmMoney(10.00);

Enjoy,
Rami Heleg