Ramsus,
Could I trouble you to try this in 2 phases?
1. Change the budget name and save
2. Set the satus and save
Let me know if that works for you.
Thanks,
Ray
On Wednesday, April 9, 2014 12:57:36 PM UTC-4, Rasmus Ladekjær Pedersen
wrote:
>
> Due to constraint that names of budgets must be uniq I am trying change
> the budget name as a budget is deleted. I C# using the client library I use
> the following code
>
> string now = DateTime.UtcNow.ToString("yyyy-MM-dd hh:mm:ss");
> budget.name = String.Format("{0} (deleted {1})", budget.name, now);
> budget.status = BudgetBudgetStatus.DELETED;
> var operations = new List<BudgetOperation>();
> operations.Add(new BudgetOperation {operand = budget, @operator =
> Operator.REMOVE});
> var service = (BudgetService)
> _user.GetService(AdWordsService.v201402.BudgetService);
> operations.ForEach(part => service.mutate(part));
>
> In the above code, budget is earlier retrieved from the API and hence
> holding the budget id.
>
> Running the code, the budget is deleted, but the budget name is not
> changed.
>
> What am I doing wrong?
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
For more options, visit https://groups.google.com/d/optout.