This is the code that fires that error message:

        CampaignCriterionServiceInterface campaignCriterionService =
                        
user.getService(AdWordsService.V201109.CAMPAIGN_CRITERION_SERVICE);
                List<CampaignCriterionOperation> operations2 = new
ArrayList<CampaignCriterionOperation>();
                Platform mobile = new Platform();
                mobile.setId(30000L);
        NegativeCampaignCriterion negativeCampaignCriterion = new
NegativeCampaignCriterion();
        negativeCampaignCriterion.setCampaignId(campaignId);
        negativeCampaignCriterion.setCriterion(mobile);
        // Create operations.
        CampaignCriterionOperation oper_neg = new
CampaignCriterionOperation();
        oper_neg.setOperand(negativeCampaignCriterion);
        oper_neg.setOperator(Operator.ADD);
                operations2.add(oper_neg);


Thanks

On 9 feb, 21:06, nachomac <nacho.mac...@gmail.com> wrote:
> Hello, I tried using NegativeCampaignCriterion excluding Platform
> Mobile, but I still get the following error:
>
> [CampaignCriterionError.CANNOT_EXCLUDE_CRITERIA_TYPE @
> operations[0].operand.criterion; trigger:'PLATFORM']
>
> What am I missing here?
>
> On 9 feb, 17:17, mm <margaret.a.mar...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Yeah, there's no way that example is going to work. When the campaign
> > is created, adwords adds all 3 platform criteria to it. In order to
> > get the desired result in that example, the desktop platform should be
> > removed, rather than adding the mobile and tablet platforms. Slightly
> > more discussion 
> > here:http://groups.google.com/group/adwords-api/browse_thread/thread/af7e4...
>
> > HTH -
> > mm
>
> > On Feb 8, 9:11 am, nachomac <nacho.mac...@gmail.com> wrote:
>
> > > Basically I want to target just PCs and Tablets, but I'm unable to do
> > > it.
>
> > > On 8 feb, 13:18, nachomac <nacho.mac...@gmail.com> wrote:
>
> > > > Hello, I'm trying this 
> > > > example:http://code.google.com/p/google-api-adwords-java/source/browse/trunk/...
> > > > just changing the campaign_id and user. It sets the geographical
> > > > criterion, but not the platforms. After running the program, the
> > > > platforms for the campaign are still 'All', not mobile and tablets
> > > > like it says it does. What's wrong?
> > > > Thanks

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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

Reply via email to