This is a very simple code, when you wants to create a CustomerOpportunityRole.
try
{
// Create the class
customeropportunityrole oppRole = new customeropportunityrole();
// Define the "Customer" to relate the Opportunity to. // This could be an Account or a Contact//
oppRole.customerid = new Customer();
oppRole.customerid.Value = new Guid("605291D0-C91E-DC11-944B-0003FF0E1518");
oppRole.customerid.type = EntityName.account.ToString();
// Define what Opportunity this relationship is for
oppRole.opportunityid = new Lookup();
oppRole.opportunityid.Value = new Guid("701C12F1-896A-DC11-961B-0003FF0E1518");
oppRole.opportunityid.type = EntityName.opportunity.ToString();
// Define what Relationship Role to use
oppRole.opportunityroleid = new Lookup
oppRole.opportunityroleid.Value = new Guid("D2A640E1-B81A-DC11-A7F0-000C29C33583");
oppRole.opportunityroleid.name="Referral";
oppRole.opportunityroleid.type = EntityName.relationshiprole.ToString();
// Assign StatusCode, StateCode
CrmNumber codeNumber = new CrmNumber();
codeNumber.Value= 1;
oppRole.opportunitystatuscode = codeNumber;
codeNumber.Value= 0;
oppRole.opportunitystatecode = codeNumber;
// Create the relationship
Guid id = service.Create(oppRole);
}
catch(System.Web.Services.Protocols.SoapException ex)
{
MessageBox.Show(ex.Detail.InnerText.ToString() + ex.Message.ToString());
}
Wednesday, October 24, 2007
Tuesday, October 16, 2007
Enable tracing in Microsoft Dynamics CRM 3.0
Microsoft Dynamics CRM 3.0 lets you create trace files that monitor the actions that are performed by Microsoft CRM. Trace files are helpful when you have to troubleshoot error messages or other issues in Microsoft CRM.You can create unmanaged trace files and managed trace files. The information in the unmanaged trace files and in the managed trace files is determined by required and optional registry entries that you create manually. You create these registry entries on the Microsoft CRM server or on the computer that is running the Microsoft CRM client for Microsoft Office Outlook after you install Microsoft CRM or the Microsoft CRM client for Outlook.
This article published on Microsoft, for more information
visit: http://support.microsoft.com/default.aspx/kb/907490
Happy MS CRM Tracing !!!!!!
This article published on Microsoft, for more information
visit: http://support.microsoft.com/default.aspx/kb/907490
Happy MS CRM Tracing !!!!!!
Posted by
Dynamics 365 Solution Architect | Azure / ALM/DevOps | Power Platform
at
6:26 AM
No comments:
Labels:
Tracing
Thursday, October 11, 2007
Remove / Detach Email from Queue
DetachFromQueueEmail Message
Detaches the e-mail from the specified queue.
// Use below code.
// Rreplace the WebService URL
service.Url = strWebServiceURL;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
DetachFromQueueEmailRequest objEmail = new DetachFromQueueEmailRequest();
// Assign Email GUID
objEmail.EmailId = new Guid(strEmailGUID.Trim());
// Assign Queue GUID
objEmail.QueueId = new Guid(QueueIdNode.InnerText.Trim().ToString());
service.Execute(objEmail);
Is it so simple..........right.
Detaches the e-mail from the specified queue.
// Use below code.
// Rreplace the WebService URL
service.Url = strWebServiceURL;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
DetachFromQueueEmailRequest objEmail = new DetachFromQueueEmailRequest();
// Assign Email GUID
objEmail.EmailId = new Guid(strEmailGUID.Trim());
// Assign Queue GUID
objEmail.QueueId = new Guid(QueueIdNode.InnerText.Trim().ToString());
service.Execute(objEmail);
Is it so simple..........right.
Saturday, September 29, 2007
Reference javascript file in Form_onLoad Event of an Entity.
Reference javascript file in Form_onLoad Event of an Account Entity.
Create a sub virtual directory under MS CRM Virtual root directory and place your .JS files in sub virtual directory.
E.G.,
Name of the sub virtual directory under MS CRM Virtual root directory is: "Customizations".
and Name of the JavaScript file you have created is "Account_Entity_Customizations.js"
Go to
Settings => Customizations => Custom Entitites => Select Account Entity => Open (double click) => Forms and Views => Form =>Form Properties => Edit OnLoad Event.
Copy paste below code in the OnLoad Event Box (select enable javascript event check box):
Save and Publish the Entity.
Refresh MS CRM Portal.
Open Account Entity, you will see your JavaScript code working.
Happy Coding !!!!!!!!!!!!!!.
Create a sub virtual directory under MS CRM Virtual root directory and place your .JS files in sub virtual directory.
E.G.,
Name of the sub virtual directory under MS CRM Virtual root directory is: "Customizations".
and Name of the JavaScript file you have created is "Account_Entity_Customizations.js"
Go to
Settings => Customizations => Custom Entitites => Select Account Entity => Open (double click) => Forms and Views => Form =>Form Properties => Edit OnLoad Event.
Copy paste below code in the OnLoad Event Box (select enable javascript event check box):
var oScript_Account = document.createElement("<script src='/Customizations/Account_Entity_Customizations.js' language='JavaScript'>");document.getElementsByTagName("head")[0].insertAdjacentElement("beforeEnd", oScript_Account);
Save and Publish the Entity.
Refresh MS CRM Portal.
Open Account Entity, you will see your JavaScript code working.
Happy Coding !!!!!!!!!!!!!!.
Friday, August 31, 2007
Create a report in 15 minutes or less
Help your team make effective business decisions based on data from Microsoft Dynamics CRM 3.0. With an understanding of the business reasons for the report and how a database works, you can create a Microsoft SQL Server Reporting Services report. After you follow the steps in this tutorial and install the required tools, it only takes a few minutes to write a useful report and to add it to Microsoft CRM. You need no prior knowledge of the required tools.
This article published on Microsoft on Updated: May 31, 2007
For more information visit:
http://www.microsoft.com/dynamics/crm/using/customizing/reporttutorial.mspx
This article published on Microsoft on Updated: May 31, 2007
For more information visit:
http://www.microsoft.com/dynamics/crm/using/customizing/reporttutorial.mspx
Posted by
Dynamics 365 Solution Architect | Azure / ALM/DevOps | Power Platform
at
6:46 AM
No comments:
Labels:
Reports
Subscribe to:
Posts (Atom)