When I create a fax,return error:0x8004023b Invalid Opera...

micccnmicccn Member Posts: 2
edited 2007-11-30 in Dynamics CRM
When I create a fax,return error:Server was unable to process request.. 0x8004023b Invalid Operation performed. Platform

This is my code:

CrmService service = new CrmService();
activityparty party = new activityparty();
Lookup Lookup1 = new Lookup();

if (!IsPostBack)
{
try
{
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Get the current user.
WhoAmIRequest userRequest = new WhoAmIRequest();
WhoAmIResponse user = (WhoAmIResponse)service.Execute(userRequest);

service.CallerIdValue = new CallerId();
service.CallerIdValue.CallerGuid = user.UserId;

////生成一个新的传真记录
fax1 = new fax();

// Set the properties of the fax1.
fax1.subject = "a";
fax1.description = "a";

// Create the party sending and receiving the fax1.
party = new activityparty();

// Set the properties of Activityparty.
party.partyid = new Lookup();
party.partyid.type = EntityName.systemuser.ToString();
party.partyid.Value = user.UserId;

// The party sends and receives the fax1.
fax1.from = new activityparty[] { party };
fax1.to = new activityparty[] { party };

//Lookup1 = new Lookup();
//Lookup1.Value = user.UserId;
//Lookup1.type = EntityName.fax.ToString();
//fax1.createdby = Lookup1;

//fax1.createdon = new CrmDateTime();
//fax1.createdon.Value = DateTime.Now.ToString();

//fax1.modifiedby = Lookup1;
//fax1.modifiedon = new CrmDateTime();
//fax1.modifiedon.Value = DateTime.Now.ToString();

fax1.ownerid = new Owner();
fax1.ownerid.type = EntityName.fax.ToString();
fax1.ownerid.Value = user.UserId;

Lookup1 = new Lookup();
Lookup1.type = EntityName.fax.ToString();
Lookup1.Value = user.BusinessUnitId;
fax1.owningbusinessunit = Lookup1;

fax1.statecode = new FaxStateInfo();
fax1.statecode.Value = FaxState.Open;
fax1.statuscode = new Status();
fax1.statuscode.name = "a";
fax1.statuscode.Value = 1;

fax1.faxnumber = "2124435";
fax1.isworkflowcreated = new CrmBoolean();
fax1.isworkflowcreated.Value = false;
fax1.scheduleddurationminutes = new CrmNumber();
fax1.scheduleddurationminutes.Value = 1;
fax1.actualdurationminutes = new CrmNumber();
fax1.actualdurationminutes.Value = 1;
fax1.actualend = new CrmDateTime();
fax1.actualend.Value = DateTime.Now.Date.ToString();
fax1.actualstart = new CrmDateTime();
fax1.actualstart.Value = DateTime.Now.Date.ToString();
fax1.billingcode = "0";
fax1.category = "";
fax1.coverpagename = "";
fax1.directioncode = new CrmBoolean();
fax1.directioncode.Value = false;
fax1.isbilled = new CrmBoolean();
fax1.isbilled.Value = true;
fax1.numberofpages = new CrmNumber();
fax1.numberofpages.Value = 1;
fax1.prioritycode = new Picklist();
fax1.prioritycode.name = "a";
fax1.prioritycode.Value = 1;
fax1.scheduledend = new CrmDateTime();
fax1.scheduledend.Value = DateTime.Now.Date.ToString();
fax1.scheduledstart = new CrmDateTime();
fax1.scheduledstart.Value = DateTime.Now.Date.ToString();
fax1.subcategory = "";
fax1.tsid = "";
//fax1.serviceid = new Lookup();
//fax1.serviceid.type = EntityName.fax.ToString();
//fax1.serviceid.Value = user.UserId;
fax1.regardingobjectid = new Lookup();
fax1.regardingobjectid.Value = new Guid("56f3f959-4a9e-dc11-97c7-000000000010");
fax1.regardingobjectid.type = EntityName.opportunity.ToString();

// Create the fax1.
Fax1Id = service.Create(fax1);
}
}
catch (System.Web.Services.Protocols.SoapException ex)
{
strErrMsg1 += ex.Message + "." + ex.Detail.InnerText;
}

I search the error code.It seem a Loophole.
"You must have Update Rollup 2 for Microsoft Dynamics CRM 3.0 installed to apply this hotfix."

But there are not Japanese version of Update Rollup 2 for Microsoft Dynamics CRM 3.0.
How can I do?
Sign In or Register to comment.