title: Receiving Error in Workflow activity code
body: <p>I am receiving the following error in my code:</p>
  
  <p>Condition for attribute 'sgfdhr_leavetype.new_employeeleavecalculation': expected argument(s) of type 'System.Guid' but received 'Microsoft.Xrm.Sdk.EntityReference'.</p>
  
  <p>My code is below:</p>
  
  <pre><code>public int Getleavetype(Entity LeaveManagement, IOrganizationService _orgService, CodeActivityContext Acontext)
          {
        QueryExpression GetLeavedetails = new QueryExpression();
        GetLeavedetails.EntityName = "sgfdhr_leavetype";
        GetLeavedetails.ColumnSet = new ColumnSet("new_type");
        GetLeavedetails.ColumnSet = new ColumnSet("new_availabledays");
        GetLeavedetails.Criteria.AddCondition("new_type", ConditionOperator.Equal, 1);
        GetLeavedetails.Criteria.AddCondition("new_employeeleavecalculation",    ConditionOperator.Equal,LeaveManagement["new_leavedetails"]);
              EntityCollection LeaveDetails = _orgService.RetrieveMultiple(GetLeavedetails);
              return (int)LeaveDetails[0]["new_availabledays"];
          }
  </code></pre>
  
  <p>I am recieving error on " EntityCollection LeaveDetails = _orgService.RetrieveMultiple(GetLeavedetails);" this line in above code.</p>
  
  <p>Thanks,</p>