I have following code for creating new Component in Tridion:
ComponentData componentData = (ComponentData)client.Create(component, new ReadOptions());
However, once I try to read Component.Id
property, it is returning new TCM URI (tcm:0-0-0
). No need to say that I tried to set flags for ReadOptions
or even SynchronizationOptions
, but nothing seems to work.
Also, I don't want to read Component again after save, I just want ID to return.
component.Id
orcomponentData.Id
? The first is the delta object you pass in (delta compared to default values) and may indeed have atcm:0-0-0
identifier. The latter is the created Component’s data and that is expected to have a regular TCM URI.