LoseOpportunityRequest loseReq = new LoseOpportunityRequest();
Entity OpportunityClose = new Entity("opportunityclose");
OpportunityClose.Attributes.Add("opportunityid", eOpportunity);
OpportunityClose.Attributes.Add("actualend", DateTime.Now);
OpportunityClose.Attributes.Add("actualrevenue", 0);
loseReq.Status = new OptionSetValue(((OptionSetValue)context.InputParameters["Status"]).Value);
loseReq.OpportunityClose = OpportunityClose;
service.Execute(loseReq);
Showing posts with label PlugIn. Show all posts
Showing posts with label PlugIn. Show all posts
Wednesday, May 20, 2015
Close Opportunity as Win
WinOpportunityRequest winReq = new WinOpportunityRequest();
Entity OpportunityClose = new Entity("opportunityclose");
OpportunityClose.Attributes.Add("opportunityid", eOpportunity);
OpportunityClose.Attributes.Add("actualend", DateTime.Now);
OpportunityClose.Attributes.Add("actualrevenue", 0);
winReq.Status = new OptionSetValue(3);
winReq.OpportunityClose = OpportunityClose;
service.Execute(winReq);
Enjoy,
Rami Heleg
Thursday, October 28, 2010
Create CRM Plugin in CRM 2011
Here is an example of creating Plugin Dll for Microsoft Dynamics CRM 2011.
Microsoft has changed the Plugin Dll code, more options to register between CRM 4 and CRM 2011.
1. Create Dll from type class library. 2. Write Code for Plugin like this example. in my example when update contact create a new task.
need to add key ( Sign this assembly - because the option to put the dll in GAC )
3. Open Plug in Registration and insert the next parameters
Label: free text. In usual i give label like organization name to prevent mistakes
Discovery URL: http://localhost:5555/XRMServices/2011/Discovery.svc
User name: Deployment admin.
4. Register the Dll
5. Register Step I in my example the event is Update for Contact Entity)
6. Update Contact:

Enjoy,
Rami Heleg
Subscribe to:
Posts (Atom)