Refresh Software Support Center

Contact Support
 

Email:
support@refreshsoftware.com

Phone:
508-318-4480


  Link to this page

Home >  Developer Resources >  Asset Types >  Eight Steps to create an Asset Type

Eight Steps to create an Asset Type

Creating a new AssetTypes is very easy to do in SR2. The following steps is the complete process a typical developer needs to follow in order to successfully add a new AssetType to SR2:

  1. Create the SQL Table
  2. Create the SQL View
  3. Create the XML file
  4. Use AssetTypes Module to add the new Asset Type to SR2
  5. Add a template to the new AssetType
  6. Create a workflow
  7. Update the Template to handle the new database fields
  8. Test the new Asset Type (Check for errors)

 

Six Simple Steps to modify an Asset Type

Here are the six steps that you should take when you add or delete an attribute in an exisiting Asset Type:

(Example: If you are adding a new teaser field to the pressrelease asset type.)

   1. Modify the SQL Table
   2. Re-Save the SQL View - (Open the view in browse mode, execute sql query then save. )
   3. Modify the XML file
   4. Use AssetTypes Module to SR2 memory
   5. Update the Template to handle the new database fields
   6. Test the new Asset Type (Check for errors)


Some problems developers usually encounter:

  1. Make sure that the database column name matchs the columnName in the XML file.
  2. SR2 Type 10: Not including the required attributes: maxselect and displayfields fields. Check the Type 10 Field Type.
  3. SR2 Type 9 and 10: SQL queries has to have an id and name column. You may use sql name aliases to use tables that don't have an id and name column.( Example: select emp_id as id, last_name as name from emp order by name)