AdGroupChangeStatus Null pointer error.

24 views
Skip to first unread message

John Geliberte

unread,
Sep 2, 2015, 5:39:04 AM9/2/15
to AdWords API Forum
Hi guys, im having a hard time on how can i get the CHANGED STATUS for AdGroup. as of now i can check the STATUS of CAMPAIGNS, i want to check for the AdGroup status.

Here is my Code, im using java by the way.

if (accountChanges != null && accountChanges.getChangedCampaigns() != null) {
System.out.println("Most recent change: "
+ accountChanges.getLastChangeTimestamp() + "\n");
for (CampaignChangeData campaignChanges : accountChanges.getChangedCampaigns()) {
System.out.println("Campaign with id \"" + campaignChanges.getCampaignId()
+ "\" was changed: ");
System.out.println("\tCampaign changed status: "
+ campaignChanges.getCampaignChangeStatus());
if (campaignChanges.getCampaignChangeStatus() == ChangeStatus.NEW) {
System.out.println("Status Triggered");
if (campaignChanges.getChangedAdGroups() != null) {
for (AdGroupChangeData adGroupChanges : campaignChanges.getChangedAdGroups()) {
System.out.println("\tAd goup with id \"" + adGroupChanges.getAdGroupId()
+ "\" was changed: ");
System.out.println("\t\tAd goup changed status: "
+ adGroupChanges.getAdGroupChangeStatus());

}

}
}
System.out.println("END");
}
} else {
System.out.println("No account changes were found.");
}
}

Hope you can help me about my concern. Thanks guys.!


Anthony Madrigal

unread,
Sep 2, 2015, 11:28:26 AM9/2/15
to AdWords API Forum
Hey John,

Could you please use Reply privately to author and provide me with your SOAP XML request and response, so that I can see why you are getting this error?

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