Note that the id is identical in both cases. I have run the code on the debugger and these ids are both definitely supplied from the Java API, I haven't mistakenly put the campaign Id into the scheduleId.
Re: Resource not found when trying to delete email campaign schedule object with Java API
I have been looking into this issue you're experiencing and found two specific things that should help you to resolve the problem:
From the URL provided, your code is using the same ID for both the campaign and the schedule (1119918593485). Each of these two items will have a unique ID. Campaign schedules are handled as a collection, and you can do a GET on that collection to get the schedule ID by calling cc.getEmailCampaignSchedules(StringcampaignId)
After reviewing the code, I did not see a method named 'getScheduleId' that was part of any of the email campaign classes. Is this a custom method that you have implemented? If so, you would need to change this to function as mentioned in item #1 so that it is fetching the schedule ID and not the campaign ID
If you have any questions about this, please let us know!
You can post a new message in the Community or find us on Twitter Mon-Fri 8am-8pm ET, Sat 10am-8pm ET, & Sun 10am-6pm ET. We've got real people waiting to help you out. Click below to start a conversation!