Can you post the code that you are using to query for the data? You might
need to add more fields to your Selector, otherwise the API will not
realize that you want that particular data to be returned.
Jim
On Tuesday, 20 March 2012 14:05:22 UTC-7, ak4chen wrote:
>
> Hi all,
>
> I'm trying to programatically update site link extensions using the API.
> So I can add and remove the first campaignAdExtension, and am aware that to
> edit a site link, it must be deleted and a new one must be created... But
> if I try to look for a site link with a status of Active versus Deleted,
> that status is always null.
>
> So I basically use the sample code in GetAllCampaignAdExtensions to get
> the list of extensions, which I currently assume to only be site link
> extensions. My expectation is that it returns a list of all active and
> deleted extensions. And I also expect to be able to see the status of each
> extension. But I cannot.
>
> I pass in the array of campaignAdExtensions into a helper method, where I
> intend to iterate over each element and check its status. See comments,
> below:
>
> // Get index of active site link extension
>
> public int getActiveSitelinkExtension(CampaignAdExtension[] adExtensions)
> {
>
> if (adExtensions == null) {
>
> return -1;
>
> }
>
> int activeIndex = -1;
>
> for (int i = 0; i < adExtensions.length; i++) {
>
> // The following is useless because the getStatus always
> returns null! It should have been automatically set to 'active' or
> 'deleted'!
>
> // Unless the documentation, or there is a bug.
>
> if (adExtensions[i].getStatus() != null &&
> adExtensions[i].getStatus().equals(CampaignAdExtensionStatus.ACTIVE)) {
>
> activeIndex = i;
>
> }
>
> }
>
> return activeIndex;
>
> }
>
>
> My suspicion is that it is a bug. If it's not, how else would I get the
> active or deleted state of a site links extension?
>
> 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 [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