How do I get the Owning Profile of an order. I can get the guid and the path but i need the whole profile to get Cost Center and information from the Profile itself. I have done the following and keep getting NULL reference.
Found a resolution by seeing another thread. If anyone else is having this issue. I do not understand what the difference is instead of passing the typeof? As stated above this is in a Package. Beats me, but found resolution.
There is no real difference between the generic and non-generic versions of GetService. Internally, the generic version merely routes to the non-generic version and casts the type appropriately for you.
If you look closely at your two code snippets, there is an important distinction that explains why the last attempt worked. The package provides access to a registered SelectServer service object, not a ProfileManagement object. Through the SelectServer object, then, you can get to the ProfileManagement service object which was registered with it.