此刻,我陷入了与帐户标签一起使用的MCC脚本中。在旧界面(我现在无法访问)中,此脚本通过按特定帐户标签选择帐户来工作。但是由于新界面的出现,这种方法似乎无法正常工作。
var labelName = "Enabled";
var labelID = '3442554025';
//按名称
var accountSelector = MccApp.accounts()
.withCondition('LabelNames CONTAINS \"' + labelName + '\"')
.orderBy('Name ASC')
.withLimit(50)
while (accountSelector.hasNext()) {
var account = accountIterator.next();
var accountName = account.getName() ? account.getName() : '--';
Logger.log('%s,%s,%s,%s', account.getCustomerId(), accountName, account.getTimeZone(), account.getCurrencyCode());
Logger.log('Check done')
}
//通过ID
var accountSelector = MccApp.accounts()
.withCondition('LabelIds CONTAINS \"' + labelID + '\"')
.orderBy('Name ASC')
.withLimit(50)
while (accountSelector.hasNext()) {
var account = accountIterator.next();
var accountName = account.getName() ? account.getName() : '--';
Logger.log('%s,%s,%s,%s', account.getCustomerId(), accountName, account.getTimeZone(), account.getCurrencyCode());
Logger.log('Check done')
希望有人可以找到我的错误或帮助我找出解决方案。谢谢您在任何情况下阅读本文。