DeleteMapField method: RCServiceConfig class
Syntax
DeleteMapField(n_index)
Description
Use the DeleteMapField method to delete the mapped page field from the related content service configuration.
Parameters
| Parameter | Description |
|---|---|
|
n_index |
Specifies the mapped page field by index as a number value. |
Returns
A boolean value: True if the delete is successful, False otherwise.
Example
In the following example, after execution of DeleteMapField, &rcMapFields is an invalid object:
import PTCS_SERVICE:RCService;
import PTCS_SRVCONFIG:RCServiceConfig;
import PTCS_SRVCONFIG:RCMapFields;
import PTCS_MENULAYOUT:RCMenuLayout;
Component PTCS_SERVICE:RCService &rcService;
Component PTCS_SRVCONFIG:RCServiceConfig &rcServConfig;
Component PTCS_SRVCONFIG:RCMapFields &rcMapFields;
Component PTCS_MENULAYOUT:RCMenuLayout &rcMenuLayout;
&rcService = create PTCS_SERVICE:RCService("EMPLOYEE", "QE_NUI_RI_GBL");
&rcServConfig = &rcService.AddNewService("MY_SERVICE", 0);
&rcMapFields = &rcServConfig.AppendMapField("0.QE_BOOK.QE_BOOK_NAME.2");
/* Required value for the ParameterName property */
&rcMapFields.ParameterName = "PTCS_MENUFIELD";
&rcMapFields.PnlName = "QE_BOOK";
&rcMapFields.MapFieldType = "PF";
&rcMapFields.RefreshService = "N";
&rcMapFields.MapNullValue = "N";
&rcMapFields.FieldMenuOpt = "Y";
Local boolean &bRet = &rcMapFields.Save();
&bRet = &rcServConfig.Save();
&rcMenuLayout = &rcServConfig.AddPageFieldMenu("QE_BOOK.2", "0.QE_BOOK.QE_BOOK_NAME.2");
&bRet = &rcServConfig.DeleteMapField(1);
/* After execution of DeleteMapField, &rcMapFields is an invalid object. */
If (&bRet) Then
/* do some processing */
&bRet = &rcServConfig.Save();
End-If;