CloneForNewFull method: RCServiceConfig class

Syntax

CloneForNewFull(service_lbl, service_ID, &dest_cmp, page_fld_ID, pg_rec_fld_ID, folder_lbl)

Description

Use the CloneForNewFull method to instantiate a new PTCS_SRVCONFIG:RCServiceConfig object by copying the current related content service configuration object executing the method. (The system generates a new instance ID.)

.

Parameters

Parameter Description

service_lbl

Specifies the service label for the new service configuration as a string value.

service_ID

Specifies the service ID for the new service configuration as a string.

&dest_cmp

Specifies destination portal and component to copy the service configuration to as an already instantiated PTCS_SERVICE:RCService object.

page_fld_ID

Specifies a string value representing the page field’s ID in the following format:

PAGE_NAME.field_ID

The field ID can be obtained from the Order tab of the page definition in Application Designer. For example:

QE_BOOK.2

pg_rec_fld_ID

Specifies a string value representing the page record field’s ID in the following format:

occurs_lvl.RECORD_NAME.FIELD_NAME.field_ID

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:

0.QE_BOOK.QE_BOOK_NAME.2

folder_lbl

Specifies the menu folder label name as a string value.

Returns

A PTCS_SRVCONFIG:RCServiceConfig 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, &rcServConfigClone;
Component PTCS_MENULAYOUT:RCMenuLayout &rcMenuLayout;
Component PTCS_MENULAYOUT:RCMenuFolder &rcMenuFolder;
Component PTCS_MENULAYOUT:RCMenuLink &rcMenuLink;

&rcService = create PTCS_SERVICE:RCService("EMPLOYEE", "PT_USERMAINT_GBL");
&rcService.MenuName = "MAINTAIN_SECURITY";
&rcService.PnlGrpName = "USERMAINT";
&rcService.ExpandFrame = "N";
&rcService.MinPagelets = 0;
&rcService.RcFrameLoc = "S";
&rcService.LanguageCd = "ENG";
&bRet = &rcService.Save();

&rcServConfig = &rcService.AddNewService("CLONE_RCPGLT", 0);
&rcServConfig.IsCompService = "C";
&rcServConfig.PnlName = "";
&rcServConfig.SeqNum = 0;
&rcServConfig.HideFromSearch = "N";
&rcServConfig.IsDefault = "N";
&rcServConfig.MapSecOptions = "P";
&rcServConfig.HandlerName = "";
&rcServConfig.InstanceLbl = "APPTEST_PGLT_SIGNIN";
&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 = "";
&bRet = &rcServConfig.Save();

&rcMenuLayout = &rcServConfig.AddPageFieldMenu("", "");
&rcMenuFolder = &rcMenuLayout.AddFolder("Root", Value(&rcServConfig.SeqNum));
&rcMenuLink = &rcMenuFolder.AppendMenuLink(&rcServConfig.ServiceId, &rcServConfig.InstanceId);
&bRet = &rcMenuLayout.Save();

&rcServConfigClone = &rcServConfig.CloneForNewFull("APPTEST_PGLT_SIGNCLN", "APPTEST_PGLT_SIGN", &rcService, "", "", "Root");
/* Modify only those properties that are different from the source config. */
&rcServConfigClone.InstanceLbl = "APPTEST_PGLT_CLONE";
&rcServConfigClone.AllowPersonalization = "N";
&bRet = &rcServConfigClone.Save();