SBarnes wrote:Hi guys
solved the problem with a call to setup before the read, not sure if this would therefore be a bug as DeliveryAddresses works without the setup call but the Notes collection is null?
I created a new console application, referenced JiwaApplication,dll, JiwaODBC.dll and JiwaDebtors.dll, and added the following code:
- Code: Select all
var ja = JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance;
ja.Logon("JiwaMike2", "JiwaDemo157", JiwaFinancials.Jiwa.JiwaODBC.database.AuthenticationModes.JiwaAuthentication, "Admin", "password");
var debtor = ja.BusinessLogicFactory.CreateBusinessLogic<JiwaFinancials.Jiwa.JiwaDebtors.Debtor>(null);
debtor.Read("0000000061000000001V");
foreach(JiwaFinancials.Jiwa.JiwaApplication.Notes.Note note in debtor.Notes)
{
System.Diagnostics.Debug.WriteLine("Note: {0}", note.NoteText);
}
foreach (JiwaFinancials.Jiwa.JiwaDebtors.DeliveryAddress deliveryAddress in debtor.DeliveryAddresses)
{
System.Diagnostics.Debug.WriteLine("Address: {0}", deliveryAddress.Address1);
}
I did not find the notes property of the debtor as null, but was valid and contained two items. The DeliveryAddress collection also was valid and contained items. You should not be calling any setup method.
Try my snippet above in a new project and see if you still have the same issue. Above was using Jiwa 7.00.157.00 and demo data.