guides:programming:programmers_reference_manual:setsubkey

SETSUBKEY Method

Method for changing the entity's sub-key in the repository. The sub-key is displayed in the Entity Relationships browser from the Repository outline menu.

retval = Repository('SETSUBKEY', entID)

The SETSUBKEY method has the following parameters.

ParameterDescription
Message'SETSUBKEY'
entIDentID consists of four elements, which are '*' (asterisk) delimited:

* Application name
* Type ID
* Class ID
* Entity name

Methods are executed as follows: if class specific, execute at the class level; if type specific, execute at the type level; otherwise, execute the method.
param1the sub-key value to store in the repository for this entity.

Null in all cases.

Note: Always call the Get_Status function after calling Repository.

Repository() function, GETSUBKEY Method, Get_Repos_Entities(). Also, Stored Procedures chapter in the Guide to Application Development.

/* Change the path for the INET_INVOICE_RPT HTML document, stored in the SUB-KEY. */

Declare Function Repository, Get_Status

AppID = @APPID<1>  ;* current application

TypeID = "DOC"  ;* ;* document type

ClassID = "HTML"  ;*  HTML class

Report_Name = 'INET_INVOICE_RPT'

New_Sub_Key = '..\HTML\NEWREPORT.HTM'

entid = AppID : '*' : TypeID : '*' : ClassID : '*' : Report_Name
 

result = Repository("SETSUBKEY", entid, New_Sub_Key)

/*  The sub key should be changed in the repository.  Result is null, so test for errors. */

If Get_Status(ErrCode) then

  call msg(@window, 'SETSUBKEY Error Message returned: ' : ErrCode)

  return 1

end
  • guides/programming/programmers_reference_manual/setsubkey.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1