Difference between revisions of "Object Changes"

From SDU
Jump to: navigation, search
m
m (Example MODIFY Statements)
Line 98: Line 98:
  
 
----
 
----
<div align='center'><font color="red">To make corrections or additions to this article, select the ''edit'' tab above.<br>
+
<div align='center'><font color="green">To make corrections or additions to this article, select the ''edit'' tab above.<br>
 
To discuss or ask questions about this article, select the ''discussion'' tab above.</font></div>
 
To discuss or ask questions about this article, select the ''discussion'' tab above.</font></div>

Revision as of 14:13, 18 July 2008

Statement Description
OBJECT Defines a new business object or changes to an existing object, such as the addition of ATTRIBUTES or TRIGGERS. These statements are generated by the Schema Designer and can be seen in the wsp.mods file. A new FACTORY must be created manually in a custom .mod file.
MODIFY Defines a modification to existing ATTRIBUTES. These statements are generated by the Schema Designer and can be seen in the wsp.mods file. The Schema Designer is limited in its capabilities to modify default ATTRIBUTES which may will require manually creation in a custom .mod file.
MODIFY FACTORY Defines a modification to a default FACTORY. These statements are created manually in a custom .mod file.


Example OBJECT Statements

Generated by Schema Designer when creating a new table: <source lang="javascript">OBJECT zchg_type {

 DISPLAY_NAME "Change Type";
 ATTRIBUTES zchg_type {
   delete_flag del SREL actbool
     REQUIRED
     {
     ON_NEW DEFAULT 0;
     };
   description STRING 480;
   sym STRING 100
     REQUIRED 
     DISPLAY_NAME "symbol";
   last_mod_dt DATE { ON_CI SET NOW; };
   last_mod_by SREL cnt { ON_CI SET USER;
                          ON_NEW DEFAULT USER; };
 };
 FACTORY zchg_type {
   STANDARD_LISTS {
     MLIST OFF;
     RLIST OFF;
   };
   FUNCTION_GROUP "change_mgr";
   REL_ATTR id;
   COMMON_NAME sym;
 };

};</source>


Generated by Schema Designer when adding a custom COLUMN or TRIGGER to an existing table: <source lang="javascript">OBJECT cr {

 ATTRIBUTES Call_Req {
   zxfer_reason SREL zxfer_reason
     
     DISPLAY_NAME "Transfer reason";
 };
 TRIGGERS {
     POST_CI val_fieldupdate_site(persistent_id, audit_userid, CHANGED_ONLY, type) 57 FILTER(EVENT("UPDATE"));
 };

};</source>


Generated manually when creating a new FACTORY: <source lang="javascript">OBJECT cr {

 FACTORY zallcrs {
   STANDARD_LISTS {
     SORT_BY "open_date DESC, id DESC, status, priority DESC, ref_num";
     MLIST OFF;
     RLIST OFF;
   };
   FUNCTION_GROUP "call_mgr";
   REL_ATTR persistent_id;
   COMMON_NAME ref_num;
 };

};</source>


Example MODIFY Statements

Generated by Schema Designer when changing a default ATTRIBUTE: <source lang="javascript">MODIFY cr status {

   REQUIRED;

};</source>


Generated manually when making a change to a default ATTRIBUTE not possible in the Schema Designer: <source lang="javascript">MODIFY cr impact {

   ON_NEW DEFAULT 2;

};</source>



To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.