2

I am trying to get the publish targets using Web 8 and Core Service. The below code works in Tridion 2013 but returns nothing in Web 8. Do I need a new filter for Web 8?

var readoptions = new ReadOptions();
var filter = new PublicationTargetsFilterData();
var allPublicationTargets = Client.GetSystemWideList(filter);
  • 1
    Those are the legacy Publication Targets, do you have them on your system, or are you using Business Process types? – Bart Koopman Jun 9 '16 at 14:10
  • Using Business Process Types. Ideally I would like to get a list of TargetTypes from a Business Process Type. – robrtc Jun 9 '16 at 14:19
  • 1
    If you really want publication targets use: new PublicationTargetsFilterData { IncludeEmulated = true } , but with new publishing model we tried to move from the concept of PTs, so we recommend to use TTs. If you want TargetTypes from a Business Process Type you can get them just from BusinessProcessTypeData.TargetTypes. – Stanislav Maryenko Jun 9 '16 at 14:37
2

I used the below code to get the new TargetTypes. Since I only have 1 BusinessProcessType this code works fine for my situation.

var readoptions = new ReadOptions();
var filter = new TargetTypesFilterData();
var allPublicationTargets = Client.GetSystemWideList(filter);

foreach (TargetTypeData pubTarget in allPublicationTargets)
{

}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.