You are viewing limited content. For full access, please sign in.

Question

Question

How to create new fields, and Templates using RA

SDK
asked on March 26, 2014

 Greetings,

I do not seem to be able to find the documentation for creating new Fields, and Templates using RA.  Could you provide the code example, or the documentation to create Fields, and Templates in LaserFiche.  I know that you have to use RA to assign fields to documents without templates.  If I remember correctly you use the FieldValueCollection to do that. if you could provided documentation location, or examples that would be great.

 

Thanks for your assistance in advance.

0 0

Answer

SELECTED ANSWER
replied on March 26, 2014

If you are trying to create a new Template or Field definition (e.g. one that doesn't already exist in the Repository), you can use the static Create methods on the Template and Field classes.

 

If you are trying to assign an existing Template or field to an Entry, use the EntryInfo.SetTemplate and EntryInfo.SetFieldValues methods. You can also use the SetTemplate(string, FieldValueCollection) overload to set both the Template and some field values at the same time. Note that DocumentInfo and FolderInfo extend EntryInfo, so you can call these methods on instances of those classes as well.

1 0

Replies

replied on April 4, 2018

Hi Mathew ... would you have a C# example of creating a template and fields using the RA SDK?

0 0
replied on April 4, 2018

Hi Tim,

The 'Tutorial: Templates and Fields' section of the SDK docs has specific examples of creating templates and fields using RA in C#.

0 0
replied on April 4, 2018

Hi Justin thanks for the quick response.  Actually what i'm having issues with is creating a new template with new fields at the same time... i keep getting error Field not found. (9016) when creating a new template with new fields.  I just made the assumption that the fields would be created if they didn't exist. 

My new question is how can you create fields using the SDK as i have looked through the Tutorials and i don't see anyway to create fields.

Adam

0 0
replied on April 4, 2018

Hrm, you're right it shows creating a field in LFSO but not RA. It's basically the same as what's shown here for templates but it would be FieldInfo instead of TemplateInfo. FieldInfo Members in the RA reference shows you other properties of it like FieldType. 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.