locked
Linqpad Help - Using CRM RRS feed

  • Question

  • Hi, I am new to using Linqpad.  I have got the CRM assemblies loaded correctly and able to create the Connection/CrmService etc. I am trying the following code and getting the below error in both Error Line 1 and 2.

    Invalid token '=' in class, struct, or interface member declaration

    Invalid token ';' in class, struct, or interface member declaration

    Can someone help with this?


    ===================================================================

    class MyExtensions
    {
            var connection = CrmConnection.Parse(@"Url=https://myserver/mytenant");
            var orgService = new OrganizationService(connection);
            var query = new Microsoft.Xrm.Sdk.Query.QueryExpression();

              Guid opt1 = new Guid("myguid here");
              var processid = new Guid("myguid here");
              var opstage3 = new Guid("myguid here");            
              Guid opid = opt1;
              Opportunity op = orgService.Retrieve(Opportunity.EntityLogicalName, opid, new ColumnSet(true)).ToEntity<Opportunity>();            
               op.ProcessId = processid; //Error Line 1
               op.StageId = opstage3;   //Error Line 2
               orgService.Update(op);           
    }



    • Edited by CRMAdmirer Wednesday, January 7, 2015 6:07 AM
    Wednesday, January 7, 2015 6:05 AM