How to find within DOM instance a particular section definition exists or not?
var domInstances= resourcemanagementHelper.DomInstances.ReadAll();
foreach (var domInstance in domInstances)
{
var abc= domInstance.Sections.Find(x=>x.SectionDefinitionID.Equals(Resourcemanagement.Sections.ResourceInternalProperties))
}
We are trying something like this but not able to figure out
Hi,
Is it possible to verify if ResourceManagement.Sections.ResourceInternalProperties is of type SectionDefinitionID? If this is from the MediaOps solution, then you need to use Resourcemanagement.Sections.ResourceInternalProperties.Id to make it work.
I see that you are now retrieving all DOM Instances. In case you are only interested in the instances containing this section, you can use below code which will be more performant.
var filter = DomInstanceExposers.SectionDefinitionIds.Contains(Resourcemanagement.Sections.ResourceInternalProperties.Id.Id);
var instances = resourcemanagementHelper.DomInstances.Read(filter);
I see that this question has been inactive for some time. Do you still need help with this? If not, could you select the answer (using the ✓ icon) to indicate that the question is resolved?