How do I get a list of RecordTypes in a Database?

为君一笑 提交于 2019-12-13 03:59:45

问题


I want to list all records in a Database.

To do this using CKQuery, it appears I must have a recordType. The predicate will be TRUEPREDICATE.

How can I get a list of RecordTypes, for eventual use within CKQuery? (e.g. I'll loop through the list, and create new CKQuery objects at run time.)


回答1:


As strange as it may seem, there is no way to determine what record types exist in a Cloud Kit database. Your code should be creating records with specific record types so your code should already know what records types there are.

If you are creating records with dynamic record types, then you should keep your own list of used record types. This should probably me maintained using yet another, but known, record type.



来源:https://stackoverflow.com/questions/39808865/how-do-i-get-a-list-of-recordtypes-in-a-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!