Hello, 

The code below checks the CanManageClients field. It should return true for 
MCC account and false for client account. 

    SelectorBuilder builder = new SelectorBuilder();
    Selector selector = builder
        .fields(ManagedCustomerField.CustomerId, ManagedCustomerField.Name, 
ManagedCustomerField.CanManageClients,               
ManagedCustomerField.TestAccount)
        .orderAscBy(CampaignField.Name)
        .offset(offset)
        .limit(PAGE_SIZE)
        .build();

    ManagedCustomerPage page = null;
    do {
      page = managedCustomerService.get(selector);

      if (page.getEntries() != null) {
        for (ManagedCustomer managedCustomer : page.getEntries()) {
          
          System.out.println("Managed Customer with with name \"" + 
managedCustomer.getName() + "\" and id \""
              + managedCustomer.getCustomerId() + "\" was found.");
          System.out.println("Can manage clients: " + 
managedCustomer.getCanManageClients());
          System.out.println("Is Test account: " + 
managedCustomer.getTestAccount());
        }
      } else {
        System.out.println("No managed customers were found.");
      }

      offset += PAGE_SIZE;
      selector = builder.increaseOffsetBy(PAGE_SIZE).build();
    } while (offset < page.getTotalNumEntries());


If this doesn't work, please send your client CustomerID and the SOAP 
request and response. Please click *Reply privately to author* in the forum 
when responding.

Thanks,
Yin, AdWords API Team. 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/c3c8fc3f-905e-422d-b892-3048769e5282%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to