11.2 Designing and Creating Custom Attributes of Object Type(s)

Once you have designed your custom object type, it inherits all the attributes (properties) of its supertype object type. You might want to additionally create some custom attributes that are unavailable in its supertype and that are specific only to this object type.

For our cust_newsarticle object type, we might need the following custom attributes (say):

  • News article one line summary
  • A flag to identify if this news article is a press release or not
  • News article priority: Out of all the published news articles, where in the order this article needs to be displayed on the website.
  • News article editor(s) and approver(s) names

It is best to prepare a small table to design the attributes for the custom object type and fill in the respective columns of the table as per your business-specific requirements. Let us discuss this in the context of our dummy website (please refer to figure 11.16):

Attribute Name

Attribute Label

Data Type

Length

Single/ Repeating

Mandatory

Values

cust_news_summary

News Article Summary

String

200

Single

Yes

None

cust_news_is_ press_rel

Is this for press release?

Boolean

0

Single

No

None

cust_news_ display_order

Display Order

Integer

0

Single

No

Conditional:

  • 1,3,5,7 if News article is for press release
  • 0,2,4,6 if News article is not for press release

cust_news_edit_approvers

Editors/Approvers

String

100

Repeating

No

None

One should design the attributes very carefully, since after an attribute has been created and checked in to the Docbase, the following cannot be modified:

  • Name of the attribute
  • Data type of the attribute
  • Whether the attribute is single or repeating
  • Length of the attribute (can only be increased)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.254.72