Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

GetRecords<ZohoNote> throwing an exception #7

Open
ChetCromer opened this issue May 24, 2016 · 0 comments
Open

GetRecords<ZohoNote> throwing an exception #7

ChetCromer opened this issue May 24, 2016 · 0 comments

Comments

@ChetCromer
Copy link
Contributor

I'm trying to pull a collection of notes from the Zoho CRM in the same manner I've pulled products and other items before.

This works fine:

ZohoCrmClient client = new ZohoCrmClient("xxx");
ZohoEntityCollection<ZohoProduct> productResponse = client.GetRecords<ZohoProduct>(new ListOptions() { FromIndex = 1, ToIndex = 200});

This, however produces the exception "Value does not fall within the expected range:"

ZohoCrmClient client = new ZohoCrmClient("xxx");
ZohoEntityCollection<ZohoNote> noteResponse = client.GetRecords<ZohoNote>(new ListOptions() { FromIndex = 1, ToIndex = 200});

I've tried sending over an empty ListOptions object as well to see if it's something with my indexes, and also using 1 and 1 instead of 1 and 200.

The full exception is below. Is there something else that needs to be included in the ListOptions object to get this to work for notes? I know there are many many notes to be processed.

System.ArgumentException was unhandled
  _HResult=-2147024809
  _message=Value does not fall within the expected range.
  HResult=-2147024809
  IsTransient=false
  Message=Value does not fall within the expected range.
  Source=Deveel.ZohoCRM
  StackTrace:
       at Deveel.Web.Zoho.ZohoCrmClient.ModuleName(Type entityType)
       at Deveel.Web.Zoho.ZohoCrmClient.ModuleName[T]()
       at Deveel.Web.Zoho.ZohoCrmClient.GetRecords[T](ListOptions options)
       at GrippBatchActions.Actions.CleanupNotes.RunAction() in c:\Users\Chet\Documents\Visual Studio 2013\Projects\dataLibertyApi\GrippBatchActions\Actions\CleanupNotes.cs:line 43
       at GrippBatchActions.Program.Main(String[] args) in c:\Users\Chet\Documents\Visual Studio 2013\Projects\dataLibertyApi\GrippBatchActions\Program.cs:line 20
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant