Hi All, I am trying to change the GetCampaigns.php example in the php library to Get Budget instead.
So I proceeded by changing the CampaignService to BudgetService. I am trying to retreive the name and amount of the budget. But I am getting the following error: An error has occurred: [SelectorError.INVALID_FIELD_NAME @ selector; trigger:'na me', SelectorError.INVALID_FIELD_NAME @ selector; trigger:'amount'] The following is a snippet of the code: function GetBudgetExample(AdWordsUser $user) { // Get the service, which loads the required classes. $budgetService = $user->GetService('BudgetService', ADWORDS_VERSION); // Create selector. $selector = new Selector(); $selector->fields = array('name', 'amount'); // $selector->ordering[] = new OrderBy('name', 'ASCENDING'); // Create paging controls. $selector->paging = new Paging(0, AdWordsConstants::RECOMMENDED_PAGE_SIZE); do { // Make the get request. $page = $budgetService->get($selector); // Display results. if (isset($page->entries)) { foreach ($page->entries as $budget) { printf("Budget with name '%s' and amount '%s' was found.\n", $budget->name, $budget->amount); } } else { print "No budgets were found.\n"; } // Advance the paging index. $selector->paging->startIndex += AdWordsConstants::RECOMMENDED_PAGE_SIZE; } while ($page->totalNumEntries > $selector->paging->startIndex); } Thanks. Please I need a quick reply if possible. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 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 --- 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.