Can I please get the syntax for the following two situations?
If Seller Type = "Individual"
If Seller Type = "Organization"
Thanks!
Visibility Based on Seller Type
-
- Posts: 1382
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
- Contact:
Re: Visibility Based on Seller Type
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
Bob Richards, Senior Software Developer, SoftPro