I've been trying to create custom Actions dropdown button (not FreedomUI) and I can't seem to be able to find working documentation for it or get something similar to it. Would like your help for it.
Here are a couple of documentations I've tried out (First one is not working while the second one isn't exactly what we want):
The task is to copy the logic of the existing "Actions" button and apply the same to the custom button. To do that (tested in the "Opportunity" section):
1) In the OpportunitySectionV2 section schema:
1.1) Add the CombinedModeCustomActionsButtonMenuItems attribute of the "Collection" dataValueType (Terrasoft.DataValueType.COLLECTION). The example is CombinedModeActionsButtonMenuItems from BaseDataView.
1.2) Create a PTP "GetCardActionsCustom" message with the SUBSCRIBE direction (as done on the BasePageV2)
1.3) In the subscribeSandboxEvents method subscribe to the "GetCardActionsCustom" message and trigger the initCustomActionButtonMenu method when the "GetCardActionsCustom" message is received (as done for the "GetCardActions" message on the BasePageV2)
1.4) Create an extension of the _initCollections method (as done for the basic "Actions" button)
1.5) Add an empty prepareCustomActionsButtonMenuItems function to methods (as done for prepareActionsButtonMenuItems method in BaseDataView)
1.6) Add the initCustomActionButtonMenu method which is a handler for the "GetCardActionsCustom" message (as done with the initActionButtonMenu method from BaseDataView).
2.1) Create the "GetCardActionsCustom" message (as done for the "GetCardActions" existing message)
2.2) In the init method call the initCustomActionButtonMenu method
2.3) Create the initCustomActionButtonMenu method (as done for the initActionButtonMenu in BasePageV2)
2.4) Create the getCustomActions method (as done with the getActions method in the basic OpportunityPageV2 with only difference that you don't need to call parent method but create an instance of the Terrasoft.BaseViewModelCollection here)
The task is to copy the logic of the existing "Actions" button and apply the same to the custom button. To do that (tested in the "Opportunity" section):
1) In the OpportunitySectionV2 section schema:
1.1) Add the CombinedModeCustomActionsButtonMenuItems attribute of the "Collection" dataValueType (Terrasoft.DataValueType.COLLECTION). The example is CombinedModeActionsButtonMenuItems from BaseDataView.
1.2) Create a PTP "GetCardActionsCustom" message with the SUBSCRIBE direction (as done on the BasePageV2)
1.3) In the subscribeSandboxEvents method subscribe to the "GetCardActionsCustom" message and trigger the initCustomActionButtonMenu method when the "GetCardActionsCustom" message is received (as done for the "GetCardActions" message on the BasePageV2)
1.4) Create an extension of the _initCollections method (as done for the basic "Actions" button)
1.5) Add an empty prepareCustomActionsButtonMenuItems function to methods (as done for prepareActionsButtonMenuItems method in BaseDataView)
1.6) Add the initCustomActionButtonMenu method which is a handler for the "GetCardActionsCustom" message (as done with the initActionButtonMenu method from BaseDataView).
2.1) Create the "GetCardActionsCustom" message (as done for the "GetCardActions" existing message)
2.2) In the init method call the initCustomActionButtonMenu method
2.3) Create the initCustomActionButtonMenu method (as done for the initActionButtonMenu in BasePageV2)
2.4) Create the getCustomActions method (as done with the getActions method in the basic OpportunityPageV2 with only difference that you don't need to call parent method but create an instance of the Terrasoft.BaseViewModelCollection here)
I need to remove the "Actions" button from the Case record page, I have tried the following codes in the DIFF array, to do remove the button but none of them seem to work: