Retrieve a Custom Field from an Object

Retrieve a Custom Field from an Object C#.NET Code

Retrieve a Custom Field from an Object C#.NET Code
                    
OAuthRequestValidator oauthValidator = new OAuthRequestValidator( accessToken, accessTokenSecret, consumerKey, consumerKeySecret); 
ServiceContext context = new ServiceContext(appToken, realmId, IntuitServicesType.QBD, oauthValidator);

DataService service = new DataService(context);

//The following code snippet creates a CustomerQuery object, executes the query and returns QuickBooks and Data Services custom fields.
Intuit.Ipp.Data.Qbd.CustomerQuery query = new Intuit.Ipp.Data.Qbd.CustomerQuery();
query.CustomFieldEnable = true;
query.CustomFieldEnableSpecified = true;

IEnumerable customers = query.ExecuteQuery(context);