How to get all contents with a specific smartform type?

Vote:
 

Hello,  We had a request of retrieve all smartform contents with one specific smartform type "xxxx". How can we do it through database? Or Is there's a faster way of doing it?  thanks! 

#195648
Aug 02, 2018 17:05
Vote:
 

Probably too late, but is this what you are trying to do?

ContentApi contentapi = new ContentApi(ApiAccessMode.Admin);
Criteria<ContentProperty> criteria = new Criteria<ContentProperty>();
criteria.AddFilter(ContentProperty.XmlConfigurationId, CriteriaFilterOperator.EqualTo, smartformid);
criteria.OrderByDirection = EkEnumeration.OrderByDirection.Ascending;
criteria.OrderByField = ContentProperty.Title;


List<Ektron.Cms.ContentData> contentDatas = contentapi.GetList(criteria);

#204273
May 23, 2019 22:42
Vote:
 

Thanks! This is definitly a solution for my case! 

I was asking if there's a sql query can perform the job. 

- Wendy

#204307
May 24, 2019 18:35
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.