Page 1 of 1
Visibility Based on Seller Type
Posted: Sun Jun 02, 2019 3:16 pm
by kendale.wyatt
Can I please get the syntax for the following two situations?
If Seller Type = "Individual"
If Seller Type = "Organization"
Thanks!
Re: Visibility Based on Seller Type
Posted: Sun Jun 02, 2019 4:57 pm
by BobRichards
Under the covers, the BuyerSellerType is a bitwise enumeration that allows you to use a math trick to determine if the buyer or seller is of type Individual or Organization.
Code: Select all
# Determine if buyer is an organization...
bool isOrganization = (buyer.BuyerSellerType & BuyerSellerType.Organization) == BuyerSellerType.Organization
# Determine if seller is an individual...
bool isIndividual = (seller.BuyerSellerType & BuyerSellerType.Individual) == BuyerSellerType.Individual