Adding fields to user profiles types in codeCancel

I am starting to write a configuration program to configure a Sitefinity solution that is about to be deployed.

I am looking for information on how to add fields to the basic Sitefinity profile type through code. I need to add 6 new fields to the "Telerik.Sitefinity.Security.Model.SitefinityProfile" type only using code. Is there any way to accomplish this? Are there any code examples out there that manage profile type fields?

The way you can create user profiles is described in detail in our documentation. Please refer to the link for further clarification.

Regards,
Ivan D. Dimitrov
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items

We do not have any API to achieve this. You will need to create your profiles from the UI.

Regards,
Ivan D. Dimitrov
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items

When doing this, if I did not map the ColumnName property, then when I tried to retrieve the field it through a database error. My complex name (TestThisObjectId) mapped to Test_this_object_Id in the database and it had trouble resolving.

field.ColumnName = "MatchToFieldName";

Also, a code example for querying against the user profiles that worked for me. Trying to query against GetProfiles<>() with a standard LINQ FirstOrDefault/Where caused a database exception, so hopefully this technique helps.

Tools

Sitefinity Professional Services

Progress, Telerik, Sitefinity and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.