I was trying to add buyers, sellers and lenders
as an example
var buyers = (IList)order["Buyers"];
var buyer = order.CreateNew("Buyer");
buyers.Add(buyer);
But it didn't seem to like this?
Seems like there is no consistency to how to do things
Adding Buyers, Sellers, Lenders
-
- Posts: 1377
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
- Contact:
Re: Adding Buyers, Sellers, Lenders
Please post your error/trace information.
Bob Richards, Senior Software Developer, SoftPro
Re: Adding Buyers, Sellers, Lenders
{"Cannot access member."}
when it hits the line buyers.Add(buyer)
it correctly came back with the list
and it correctly created the new object buyer
when it hits the line buyers.Add(buyer)
it correctly came back with the list
and it correctly created the new object buyer
-
- Posts: 411
- Joined: Thu Sep 11, 2008 11:35 am
- Location: Raleigh, NC, USA
- Contact:
Re: Adding Buyers, Sellers, Lenders
You need to add the buyer to the contacts collection, not directly to the buyers collection.
The buyes, sellers, lenders, etc collections are simply read only views of the entire contacts collection.
The buyes, sellers, lenders, etc collections are simply read only views of the entire contacts collection.
John Morris
Sr. Software Architect
SoftPro
Sr. Software Architect
SoftPro
-
- Posts: 1377
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
- Contact:
Re: Adding Buyers, Sellers, Lenders
For example:
Code: Select all
var contacts = (IList)iOrder["Contacts"];
var buyer = iOrder.CreateNew("Buyer");
contacts.Add(buyer);
Bob Richards, Senior Software Developer, SoftPro