Buyer Data for Individuals

Discussions related to SoftPro Select user interface development.

Moderator: Phil Barton

Post Reply
danny.little
Posts: 21
Joined: Fri May 14, 2010 10:18 am

Buyer Data for Individuals

Post by danny.little »

Was wondering how to set the Individual first/middle/last/suffix name on the buyer when the Male or Female Type is selected. I also cannot set their current and forwarding phone information or Social Security Information, I am using the following code with a created buyer type:

This sets the Name, but does not set the separate names fields.

Code: Select all

                    buyer.IndivOrOrg = IndividualOrOrganization.Individual;
                    buyer.Type = "Male";
                    buyer.CreditAccountName = buyer.Name = buyer.PayeeName =
                        string.Format("{0}{1} {2}{3}",
                        principal.FirstName,
                        string.IsNullOrEmpty(principal.MiddleName) ? "" : " " + principal.MiddleName,
                        principal.LastName,
                        string.IsNullOrEmpty(principal.Suffix) ? "" : " " + principal.Suffix);
                    buyer.IndivName1First = principal.FirstName;
                    buyer.IndivName1Middle = principal.MiddleName;
                    buyer.IndivName1Last = principal.LastName;
                    buyer.IndivName1Suffix = principal.Suffix;
Thanks
Danny Little
Melissa McBerkowitz
Posts: 91
Joined: Wed Sep 10, 2008 3:33 pm
Location: Raleigh, NC
Contact:

Re: Buyer Data for Individuals

Post by Melissa McBerkowitz »

Hey Danny!

Those properties on the Buyer ("IndivName1...") exist for convenience for docs and formulas. The true way to set individuals' names is through buyer.BuyerSellerPerson. On BuyerSellerPerson, you'll find all those pieces of their names, plus all the additional data you mentioned (current/forwarding contact info, SSN, etc.).

Side note: Once you set the first/last/middle/etc. through BuyerSellerPerson, our business rules engine will populate buyer.Name, PayeeName, and CreditAccountName for you.
Melissa McBerkowitz
VP of Product Strategy, SoftPro
danny.little
Posts: 21
Joined: Fri May 14, 2010 10:18 am

Re: Buyer Data for Individuals

Post by danny.little »

Hey Melissa!!

Thanks for the quick response, and i just got around to trying this and it still did nothing for me. Here is the full code:

Code: Select all

                IBuyer buyer = order.Buyer.CreateNew();
                IBuyerSellerPerson buyerPerson = buyer.BuyerSellerPerson.CreateNew();
                buyerPerson.FirstName = "John";
                buyerPerson.LastName = "Morris";
                buyerPerson.Phone = "(123)123-1234";

                //buyer.IndivName1First = "John";
                //buyer.IndivName1Last = "Morris";
                buyer.Address1 = "123 Somewhere St.";
                buyer.City = "Raleigh";
                buyer.State = "NC";
                buyer.Zip = "27609";
Thanks
Danny Little
danny.little
Posts: 21
Joined: Fri May 14, 2010 10:18 am

Re: Buyer Data for Individuals

Post by danny.little »

Sorry Melissa,

If i would have just tried looking at it a little further, i would have seen you meant that you create 2 of these and I need to just get the first and or second one depending on the type. Thanks A million. Here is the code that works!!!! WHEEEEE! Maybe I will save someone else this embarrassment :oops:

Code: Select all

                IBuyer buyer = order.Buyer.CreateNew();
                IBuyerSellerPerson buyerPerson = buyer.BuyerSellerPerson[0];

                buyerPerson.FirstName = "John";
                buyerPerson.LastName = "Morris";
                buyerPerson.Phone = "(123)123-1234";

                //buyer.IndivName1First = "John";
                //buyer.IndivName1Last = "Morris";
                buyer.Address1 = "123 Somewhere St.";
                buyer.City = "Raleigh";
                buyer.State = "NC";
                buyer.Zip = "27609";
danny.little wrote:Hey Melissa!!

Thanks for the quick response, and i just got around to trying this and it still did nothing for me. Here is the full code:

Code: Select all

                IBuyer buyer = order.Buyer.CreateNew();
                IBuyerSellerPerson buyerPerson = buyer.BuyerSellerPerson.CreateNew();
                buyerPerson.FirstName = "John";
                buyerPerson.LastName = "Morris";
                buyerPerson.Phone = "(123)123-1234";

                //buyer.IndivName1First = "John";
                //buyer.IndivName1Last = "Morris";
                buyer.Address1 = "123 Somewhere St.";
                buyer.City = "Raleigh";
                buyer.State = "NC";
                buyer.Zip = "27609";
Thanks
Danny Little
Post Reply