Can't delete budget

31 views
Skip to first unread message

rentca...@gmail.com

unread,
Sep 22, 2016, 2:49:04 PM9/22/16
to AdWords API Forum
    Public Function RemoveBudget(ByVal budget As Budget) As Budget

        Dim Locations As New Dictionary(Of Int64, Location)
        Dim service As BudgetService = CType(User.GetService(AdWordsService.v201607.BudgetService), BudgetService)

        Dim operation As BudgetOperation = New BudgetOperation()
        budget.status = BudgetBudgetStatus.REMOVED
        operation.operand = budget
        operation.operator = [Operator].REMOVE

        Dim operations(0) As BudgetOperation

        operations(0) = operation
        Try
            service.mutate(operations)

        Catch e As Exception
            Throw New System.ApplicationException("Failed to get location for ad.", e)
        End Try
        Return Nothing
    End Function


the budget object passed to this function is returned from the BudgetService via a get.  The code runs smoothly without an error, yet my next Get request finds the same budget with same Id like my Remove operation was just ignored.

Shwetha Vastrad (AdWords API Team)

unread,
Sep 22, 2016, 5:06:46 PM9/22/16
to AdWords API Forum
Hi,

Could you enable logging and provide the SOAP XML request and response logs for the BudgetService get request where the removed Budget is returned in the response? Are you using any predicates to include only the enabled budgets in the response? Please use Reply privately to author when responding. 

Thanks,
Shwetha, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages