I am following the documentation provided with the SDK download. I have been able to successfully begin a session but all of the factory lists are empty. For example when i am in the Sage 50 accounting interface there are many vendors listed but when i do the following the list is empty? How can i get the list of vendors with the SDK?
Company companyContext = null;
session = new PeachtreeSession();
session.Begin("<valid key>"); //I have a valid API key and session is created successfully.
CompanyIdentifierList m_companyIdList = session.CompanyList();
CompanyIdentifier companyId = m_companyIdList.Find(delegate(CompanyIdentifier o)
{ return o.CompanyName == "Company Name"; });
AuthorizationResult AuthResult = session.RequestAccess(companyId);
AuthResult = session.VerifyAccess(companyId);
if (AuthResult == AuthorizationResult.Granted)
companyContext = session.Open(companyId);
//AuthResult is granted
VendorList vendors = companyContext.Factories.VendorFactory.List();
//vendors count = 0??
Any ideas why the Sage interface shows vendors but the SDK does not retrieve them?
Thanks