I need to fetch a component based on its tcm id using the core services. Please help me which function of core service I can use along with some sample code if possible as well.
Thanks in advance!!
I need to fetch a component based on its tcm id using the core services. Please help me which function of core service I can use along with some sample code if possible as well.
Thanks in advance!!
Check the section in the documentation, which you can find here
A basic sample (out of my head, untested ;) ):
The
Readmethod will get you anIdentifiableObjectDataobject, which you can cast to the needed type if you're sure about what you're supposed to be getting back. TheReadOptionsobject will instruct the CoreService how to load the item, for instance, with all Keyword URI's loaded as well usingLoadFlags.KeywordXlinks