Adding Buyers, Sellers, Lenders

Discussions related to custom development with Select.
Post Reply
ddudley3
Posts: 55
Joined: Fri May 03, 2013 9:11 am

Adding Buyers, Sellers, Lenders

Post by ddudley3 »

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
BobRichards
Posts: 1377
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Adding Buyers, Sellers, Lenders

Post by BobRichards »

Please post your error/trace information.
Bob Richards, Senior Software Developer, SoftPro
ddudley3
Posts: 55
Joined: Fri May 03, 2013 9:11 am

Re: Adding Buyers, Sellers, Lenders

Post by ddudley3 »

{"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
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Adding Buyers, Sellers, Lenders

Post by John Morris »

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.
John Morris
Sr. Software Architect
SoftPro
BobRichards
Posts: 1377
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Adding Buyers, Sellers, Lenders

Post by BobRichards »

For example:

Code: Select all

var contacts = (IList)iOrder["Contacts"];
var buyer = iOrder.CreateNew("Buyer");
contacts.Add(buyer);
Bob Richards, Senior Software Developer, SoftPro
Post Reply