DeleteMenuLink method: RCMenuLayout class

Syntax

DeleteMenuLink(service_ID, instance_ID)

Description

Use the DeleteMenuLink method to delete the specified menu link from the layout.

Parameters

Parameter Description

service_ID

Specifies a string value representing the service ID for the parent related content service configuration.

instance_ID

Specifies an integer value representing the instance ID for the parent related content service configuration.

Returns

A boolean value: True if the delete is successful, False otherwise.

Example

import PTCS_SERVICE:RCService;
import PTCS_SRVCONFIG:RCServiceConfig;
import PTCS_MENULAYOUT:RCMenuLayout;
import PTCS_MENULAYOUT:RCMenuLink;

Component PTCS_SERVICE:RCService &rcService;
Component PTCS_SRVCONFIG:RCServiceConfig &rcServConfig;
Component PTCS_MENULAYOUT:RCMenuLayout &rcMenuLayout;
Component PTCS_MENULAYOUT:RCMenuLink &rcMenuLink;

&rcServConfig = &rcService.AddNewService("MY_SERVICE", 0);
&rcMenuLayout = &rcServConfig.AddPageFieldMenu("QE_BOOK.2", "0.QE_BOOK.QE_BOOK_NAME.2");
If (&rcMenuLayout <> Null) Then
   &bRet = &rcMenuLayout.DeleteMenuLink("MY_SERVICE", &rcServConfig.InstanceId);
   If (&bRet) Then
      /* do some processing */
      Local boolean &bRet2 = &rcMenuLayout.Save();
   End-If;
End-If;