Hi
I’m working on premise CRM 2011, SQL 2008 R2, Windows 2008 and Visual Studio 2010.
I want to adapt and compile the SampleCode executeworkflow.cs into something that I can call from SQL Agent.
I’ve made the changes I need, published the Workflows project and successfully run the published setup.exe from within Visual Studio. At this point the only changes I have made to the .cs file are to comment out the call to CreateRequiredRecords, set
the GUID of my workflow to the record I want to invoke and used a query to pick up records against which to run the workflow.
My Visual Studio project has the Target Framework set to .NET Framework 4
When I call up the Visual Studio Command Prompt and try to compile the executeworkflow.cs I get a series of errors as follows:
ExecuteWorkflow.cs(23,17): error CS0234: The type or namespace name 'Xrm' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
ExecuteWorkflow.cs(24,17): error CS0234: The type or namespace name 'Xrm' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
ExecuteWorkflow.cs(25,17): error CS0234: The type or namespace name 'Xrm' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
ExecuteWorkflow.cs(29,25): error CS0234: The type or namespace name 'Messages' does not exist in the namespace 'Microsoft.Crm.Sdk' (are you missing an assembly reference?)
ExecuteWorkflow.cs(44,17): error CS0246: The type or namespace name 'OrganizationServiceProxy' could not be found (are you missing a using directive or an assembly reference?)
ExecuteWorkflow.cs(55,25): error CS0246: The type or namespace name 'ServerConnection' could not be found (are you missing a using directive or an assembly reference?)
Any assistance appreciated.
Thanks
David