Hi,
Ive got the CommitAPI and I am trying to retrieve data from my local copy of CommitCRM.
Ive got a sample query which gets the the Contact Name from the Account section and shows it in a console window. I am using C# to do this.
However when I run the console app i get the following error
"Status 2000: General Error Occurred FAILURE" "Result Message:"
here is the code i am using, CommitCRM is installed in in a folder called "DATA" as shown below and the Db Folder is called "Db" and not "db" as in the API Wiki.
Any help would be greatly appreciated. thanks
CommitCRM.Config config = new CommitCRM.Config();
config.AppName = "C# Demo";
config.CommitDllFolder = "C:\\DATA\\CommitCRM\\ThirdParty\\UserDev";
config.CommitDbFolder = "C:\\DATA\\CommitCRM\\Db";
CommitCRM.Application.Initialize(config);
CommitCRM.ObjectQuery<CommitCRM.Account> accountSearch = new CommitCRM.ObjectQuery<CommitCRM.Account>();
accountSearch.AddCriteria(CommitCRM.Account.Fields .Contact, CommitCRM.OperatorEnum.opEqual, "Aisha");
List<CommitCRM.Account> accounts = accountSearch.FetchObjects();
foreach (CommitCRM.Account account in accounts)
{
Console.Out.WriteLine(account.CompanyName);
}
Ive got the CommitAPI and I am trying to retrieve data from my local copy of CommitCRM.
Ive got a sample query which gets the the Contact Name from the Account section and shows it in a console window. I am using C# to do this.
However when I run the console app i get the following error
"Status 2000: General Error Occurred FAILURE" "Result Message:"
here is the code i am using, CommitCRM is installed in in a folder called "DATA" as shown below and the Db Folder is called "Db" and not "db" as in the API Wiki.
Any help would be greatly appreciated. thanks
CommitCRM.Config config = new CommitCRM.Config();
config.AppName = "C# Demo";
config.CommitDllFolder = "C:\\DATA\\CommitCRM\\ThirdParty\\UserDev";
config.CommitDbFolder = "C:\\DATA\\CommitCRM\\Db";
CommitCRM.Application.Initialize(config);
CommitCRM.ObjectQuery<CommitCRM.Account> accountSearch = new CommitCRM.ObjectQuery<CommitCRM.Account>();
accountSearch.AddCriteria(CommitCRM.Account.Fields .Contact, CommitCRM.OperatorEnum.opEqual, "Aisha");
List<CommitCRM.Account> accounts = accountSearch.FetchObjects();
foreach (CommitCRM.Account account in accounts)
{
Console.Out.WriteLine(account.CompanyName);
}
Comment