Convert DateTime to SuperDate
For DateTime, you can use its built-in formatting options of toString().
Convert Date to SuperDate
For Date, you need to format the string yourself.
Convert SuperDate to DateTime
Convert SuperDate to Date
Get all user-defined fields from entity
GetUserDefinedFields() retrieves all registered user-defined fields from an entity. Here, we use NSContactEntity.
Map is a collection of key-value pairs. The key is not the label you gave the field! It’s the prog ID!
Get a specific field
Update user-defined field value
Call SetUserDefinedFields to set a user-defined field.
Remember to use the prog ID to identify the field. (SuperOffice:1 in this example)
The field we’re updating here is a date, so we have to make sure it’s on the SuperDate format.
Search based on user-defined field
This example uses the NSFindAgent to look up appointments based on a user-defined field. The search itself happens when we call FindFromRestrictionsColumns(). We then loop through and print the result.