CloneForNewFull method: RCMenuLayout class
Syntax
CloneForNewFull(&rcServiceConfig, page_fld_ID, pg_rec_fld_ID)
Description
Use the CloneForNewFull method to instantiate a new PTCS_MENULAYOUT:RCMenuLayout object associated with the specified service configuration object. The menu layout of the object executing this method is copied to the new object.
Parameters
| Parameter | Description |
|---|---|
|
&rcServiceConfig |
Specifies an already instantiated PTCS_SRVCONFIG:RCServiceConfig object that this new menu layout will be associated with. |
|
page_fld_ID |
Specifies a string value representing the page field’s ID in the following format:
The field ID can be obtained from the Order tab of the page definition in Application Designer. For example:
|
|
pg_rec_fld_ID |
Specifies a string value representing the page record field’s ID in the following format:
The occurs level, record name, field name, and field ID can be obtained from the Order tab of the page definition in Application Designer. For example:
|
Returns
A PTCS_MENULAYOUT:RCMenuLayout object.
Example
import PTCS_SERVICE:RCService;
import PTCS_SRVCONFIG:RCServiceConfig;
import PTCS_MENULAYOUT:RCMenuLayout;
import PTCS_MENULAYOUT:RCMenuFolder;
import PTCS_MENULAYOUT:RCMenuLink;
Component PTCS_SERVICE:RCService &rcService;
Component PTCS_SRVCONFIG:RCServiceConfig &rcServConfig;
Component PTCS_MENULAYOUT:RCMenuLayout &rcMenuLayout, &rcMenuLayoutNew;
Component PTCS_MENULAYOUT:RCMenuFolder &rcMenuFolder;
Component PTCS_MENULAYOUT:RCMenuLink &rcMenuLink;
&rcServConfig = &rcService.AddNewService("MY_SERVICE", 0);
&rcServConfig.IsCompService = "C";
&rcServConfig.PnlName = "";
&rcServConfig.SeqNum = 0;
&rcServConfig.HideFromSearch = "N";
&rcServConfig.IsDefault = "N";
&rcServConfig.MapSecOptions = "P";
&rcServConfig.HandlerName = "";
&rcServConfig.InstanceLbl = "CLONERCPGLT";
&rcServConfig.UrlTarget = "RCF";
&rcServConfig.MenuOpt = "Y";
&rcServConfig.MainMenuOpt = "N";
&rcServConfig.nSeqNumMmnu = 0;
&rcServConfig.nSeqNumRmnu = 0;
&rcServConfig.PackageRoot = "";
&rcServConfig.QualifyPath = "";
&rcServConfig.AppClassId = "";
&rcServConfig.cInitMin = "N";
&rcServConfig.cEnable = "Y";
&rcServConfig.SrvcOpenOpt = "";
&rcServConfig.IsEmbeddable = "";
&rcServConfig.IsSingleUOW = "";
&rcServConfig.MasterTemplate = "";
&rcServConfig.AllowPersonalization = "Y";
&rcServConfig.CompEvent = "";
&rcServConfig.ProcessSeq = "";
Local boolean &bRet1 = &rcServConfig.Save();
&rcMenuLayout = &rcServConfig.AddPageFieldMenu("", "");
&rcMenuFolder = &rcMenuLayout.AddFolder("Root", Value(&rcServConfig.SeqNum));
&rcMenuLink = &rcMenuFolder.AppendMenuLink(&rcServConfig.ServiceId, &rcServConfig.InstanceId);
Local boolean &bRet2 = &rcMenuLayout.Save();
&rcMenuLayoutNew = &rcMenuLayout.CloneForNewFull(&rcServConfig, "QE_BOOK.2", "0.QE_BOOK.QE_BOOK_NAME.2");
If (&rcMenuLayoutNew <> Null) Then
/* do some processing */
End-If;