Re: unable to remove labels from AdGroupCriterion using php client library

2017-12-18 Thread 'Milind Sankeshware (AdWords API Team)' via AdWords API Forum
Hi Orzorc, I tried the below line of code in PHP and was able to set the Label in the AdGroupCriterion to null in the request. Please check the attached logs for reference. $adGroupCriterion->setLabels([new Label()]); Could you please try passing the empty array as above and let me know if y

Re: unable to remove labels from AdGroupCriterion using php client library

2017-12-15 Thread orzorc
Hi Milind, I have tried to passing an empty Label array. But I got 'operations[0].operand.labels[0].id=>EntityNotFound.INVALID_ID' error as my previous post said. Now I am using Reflection in PHP to set the property to null and it works fine. But I don't think it's a good practice. Maybe client

Re: unable to remove labels from AdGroupCriterion using php client library

2017-12-15 Thread 'Milind Sankeshware (AdWords API Team)' via AdWords API Forum
Hi Orzorc, When you perform an AdGroupCriterionService.get() , you will have the labels

Re: unable to remove labels from AdGroupCriterion using php client library

2017-12-14 Thread orzorc
Hi Milind, Sorry I didn't make myself clear. Actually I am not trying to remove labels from exsiting criterion but *set labels property to null* in AdGroupCriterion instance. And this is my case: I get some AdGroupCriterion objects via AdGroupCriterionService and pass them through my code, in thi

Re: unable to remove labels from AdGroupCriterion using php client library

2017-12-14 Thread 'Milind Sankeshware (AdWords API Team)' via AdWords API Forum
Hi Orzorc, To removes labels from the AdGroupCriterion, you can use mutateLabel of AdGroupCriterionService

unable to remove labels from AdGroupCriterion using php client library

2017-12-14 Thread orzorc
Hi, I found that AdGroupCriterion.setLabels requires an array which means you can not set null to labels. But if you pass it with an empty array and upload, you will get errors like 'operations[0].operand.labels[0].id=>EntityNotFound.INVALID_ID'. So one will not be able to remove labels from thos