It throws a Nullreferenceexception just at the line :EntityCollection results = _service.RetrieveMultiple(fetch); I am trying to code this inside button event, can that be the cause? private void btnUpdate_Click(object sender, EventArgs e) { string fetchXml = @" ------------- ------------------ "; FetchExpression fetch = new FetchExpression(fetchXml); EntityCollection results = _service.RetrieveMultiple(fetch); throw new InvalidPluginExecutionException("Count of Records: "+results.Entities.Count);
↧