With the reference to this thread: https://tridion.stackexchange.com/a/4597/1556
I am looking for a similar answer where I need to fetch a list of publishing purposes(BPT) instead of PublicationTargets.
Could someone please suggest me this?
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It only takes a minute to sign up.Sign up to join this community
A Publication/Repository has a
BusinessProcessType property which tells you what the selected Business Process Type (BPT) is for that Publication/Repository (if any).
A Business Process Type contains a set of Target Types which each have a distinct Purpose.
So, if you are working with TOM.NET and want to get a list of publishing purposes for a given context Publication, your code could look like this:
contextPublication.BussinessProcessType?.TargetTypes.Select(tt => tt.Purpose);