Any chance you are trying to change the status of a REMOVED campaign?

-Danial.


On Thursday, April 16, 2015 at 4:54:23 PM UTC+3, Michael D wrote:
>
>
> If I use Operation.SET instead of Operation.REMOVE the same Error occurs!
>
> Are there some other mistakes?
>
> Am Mittwoch, 15. April 2015 17:06:07 UTC+2 schrieb [email protected]:
>>
>> Hi,
>>
>> Im trying to change Campaignstatus.
>> But i always get the Error:
>>
>> [OperatorError.OPERATOR_NOT_SUPPORTED @ operations[0]]
>>
>> This is how I do it:
>> Does someone know what I am doing wrong here?
>>
>>             var client = new CampaignService.CampaignService();
>>
>>             
>>             //create Campaign with Status
>>             Campaign campaign = new Campaign();
>>             campaign.id = CurrentCampaignId;
>>
>>             switch (index)
>>             {
>>                 case 0:
>>                     campaign.status=CampaignStatus.ENABLED;
>>                     break;
>>                 case 1:
>>                     campaign.status=CampaignStatus.PAUSED;
>>                     break;
>>                 case 2:
>>                     campaign.status=CampaignStatus.REMOVED;
>>                     break;
>>             }
>>
>>             //Create the Operation
>>             CampaignOperation operation = new CampaignOperation();
>>             operation.operand = campaign;
>>             operation.operatorSpecified = true;
>>             operation.@operator= Operator.REMOVE;
>>             
>>            
>>             try
>>             {
>>                 client.PreAuthenticate = true;
>>                 client.UseDefaultCredentials = true;
>>                 client.RequestHeader = new SoapHeader
>>                 {
>>                     clientCustomerId = clientCustomerId,
>>                     developerToken = "XXXXXXXXXXXXXXXXXXXXX",
>>                     partialFailure = false,
>>                     userAgent = "AdWordsChangeStatus",
>>                     validateOnly = false,
>>                 };
>>                 client.PreAuthenticate = true;
>>
>>                 CampaignReturnValue returnValue = client.mutate(new 
>> CampaignOperation[] {operation});
>>
>>                 if (returnValue != null && returnValue.value != null && 
>> returnValue.value.Length > 0)
>>                 {
>>                     Campaign changedCampaign = returnValue.value[0];
>>                 }
>>                 else
>>                 {
>>                     Console.WriteLine("No status has changed");
>>                 }
>>
>>             }
>>             catch (Exception ex)
>>             {
>>                 throw new System.ApplicationException("Failed to change 
>> status", ex);
>>             }   
>>
>>
>> Thank you very much
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/4ac40310-35f0-4f4e-b3c5-dbc33ddf02be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to