Page History
...
Method to create new entities. This includes entities that are inherited from another application.Note:
Note |
---|
The difference between using Repository('NEW') and writing directly to a system table (such as SYSREPOSWINS for windows) using a BASIC+ program is that using the Repository('NEW') function records the event to the repository history log, while the direct WRITE statement does not record the event. Using the Repository() functions is recommended. |
Syntax
retval = Repository("NEW" , entID, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10)
...
Null.
Note: Always call the Get_Status function after calling Repository.
See also
Repository() function, WRITE Method, Get_Repos_Entities().
Example
Code Block |
---|
/* Write a message called SAMPLE_MESSAGE to the repository, making it SHAREABLE and PUBLISHABLE */ declare function repository, get_status AppID = @APPID<1> ;* current application TypeID = "MSG" ;* OpenInsight message ClassID = "" ;* Not Applicable Message_Name = 'SAMPLE_MESSAGE' entid = AppID : '*' : TypeID : '*' : ClassID : '*' : Message_Name MsgRec = 'This is a test message' /* MsgRec contains the text of the message. See Msg() for complete message row to write */ * write the record retval = Repository("NEW", EntID, "", 1, 1, "", "", "", "", "", "MSG", MsgRec) /* check if write completed correctly */ If Get_Status(ErrCode) then call msg(@window, 'Error Message returned: ' : ErrCode) end |