Link Checker - Manager Account giving accountselector error

303 views
Skip to first unread message

Jeroen Nijsen

unread,
Jul 6, 2016, 9:55:41 AM7/6/16
to AdWords Scripts Forum

Hello,

I've been trying to run the MCC account link checker, but am running into an issue with the account selector where the error is: "Exception: one of the conditions of the query is invalid." I modified the accountselector a little bit because I never want to select all accounts, but I don't see how that could cause any issues:

CONFIG.ACCOUNT_CONDITIONS: ['xxx-xxx-xxxx','xxx-xxx-xxxx','xxx-xxx-xxxx','xxx-xxx-xxxx','xxx-xxx-xxxx',
                       'xxx-xxx-xxxx','xxx-xxx-xxxx','xxx-xxx-xxxx','xxx-xxx-xxxx','xxx-xxx-xxxx',
                       'xxx-xxx-xxxx','xxx-xxx-xxxx','xxx-xxx-xxxx']


function getAccounts(isChecked) {
 
var accountSelector = MccApp.accounts();


 
if (getAccountLabel(CONFIG.LABEL)) {
    accountSelector
= accountSelector.
      withCondition
('LabelNames ' +
                   
(isChecked ? 'CONTAINS' : 'DOES_NOT_CONTAIN') +
                     
' "' + CONFIG.LABEL + '"');
 
}


 
if (CONFIG.ACCOUNT_CONDITIONS) {
   
for (var i = 0; i < CONFIG.ACCOUNT_CONDITIONS.length; i++) {
     
      accountSelector
=
          accountSelector
.withCondition(CONFIG.ACCOUNT_CONDITIONS[i]);
   
}
 
}
 
 
else { throw EXCEPTION.NO_SELECTION; }
 
return accountSelector;
}


Your support would be much appreciated!

Regards,
Jeroen

Tyler Sidell (AdWords Scripts Team)

unread,
Jul 6, 2016, 11:13:31 AM7/6/16
to AdWords Scripts Forum
Hi Jeroen,

Are you using our newest version of the MCC Link Checker script? We recently released version 2.0. I suggest using the latest script and modifying ACCOUNT_CONDITIONS: [], and letting us know if you are still running into issues. If so, you can provide us with your CID (reply privately to the author) along with the name of the script.

Thanks,
Tyler Sidell
AdWords Scripts Team

Jeroen Nijsen

unread,
Jul 12, 2016, 8:41:35 AM7/12/16
to AdWords Scripts Forum
Hi Tyler,

Thanks for your response! Will look into version 2.0 and let you know if I run into anything.

Regards,
Jeroen

Op woensdag 6 juli 2016 17:13:31 UTC+2 schreef Tyler Sidell (AdWords Scripts Team):

Gernot Gawlik

unread,
Jul 28, 2016, 4:02:01 AM7/28/16
to AdWords Scripts Forum
Hi Tyler,

please can you post two working examples for the linke Account_Conditions?

Why these (following) lines not working for me?

ACCOUNT_CONDITIONS: ['169-xxx-xxxx','350-xxx-xxx'],

or

ACCOUNT_CONDITIONS: ['LabelNames CONTAINS "EXAMPLE"'],

How can I fix this?

Hope for help!
Best regards
Gernot

Jaren Callo (AdWords Scripts Team)

unread,
Jul 28, 2016, 4:40:44 AM7/28/16
to AdWords Scripts Forum
Hi Gernot,

Here are the valid conditions. Please take note of the operators and column name used.

Label example:
ACCOUNT_CONDITIONS: ["LabelNames CONTAINS 'priority'"]

Account Id example:
ACCOUNT_CONDITIONS: ["ManagerCustomerId IN ['123-456-7890']", "ManagerCustomerId IN [1234567890]"]

Let us know if you are still running into issues. If so, you can provide us with your CID (reply privately to the author) along with the name of the script.

Thanks,
Jaren P. Callo
AdWords Scripts Team
Message has been deleted

Vincent Racaza (AdWords Scripts Team)

unread,
Jun 15, 2017, 11:39:45 PM6/15/17
to AdWords Scripts Forum
Hi,

You need to set the CIDs in the ACCOUNT_CONDITIONS variable this way:

ACCOUNT_CONDITIONS: ["ManagerCustomerId IN ['xxx-xxx-xxxx','xxx-xxx-xxxx','xxx-xxx-xxxx']"],

If this does not solve your issue, please open a new forum thread since this thread is a bit old.

Thanks,
Vincent Racaza
AdWords Scripts Team
Reply all
Reply to author
Forward
0 new messages