Work with Modals
The following are Apex classes to work with modals.
ModalHandler Interface
Implement this interface to return a modal view.
ModalHandler Methods
ModalHandler has the following method.
call()
Enables you to create an instance of modal view with the view reference parameters.
Signature
1 public Slack . ModalView call ( )
Return Value
Type: Slack.ModalView
ModalView Class
Creates a modal view. A view is a visual area within a modal. See Defining view objects .
ModalView Methods
The following are methods for ModalView.
builder()
Builds a request object that’s used when executing the API call.
Signature
1 public static Slack . ModalView . Builder builder ( )
Return Value
Type: Slack.ModalView.Builder
ModalView.Builder Class
Contains methods to build an instance of the Slack.ModalView class.
A Builder object is obtained by invoking one of the ModalView.Builder methods defined by the ModalView class.
ModalView.Builder Methods
The following are methods for ModalView.Builder.
build()
Returns an instance of the Slack.ModalView object.
Signature
1 public Slack . ModalView build ( )
Return Value
Type: Slack.ModalView
clearOnClose(clearOnClose)
Sets the clearOnClose boolean value on the modal view object.
Signature
1 public Slack . ModalView . Builder clearOnClose ( Boolean clearOnClose )
Parameters
clearOnClose
Specifies whether clicking on the close button clears all views in a modal and closes it. This value defaults to false.
Type: Boolean
Return Value
Type: Slack.ModalView.Builder
externalId(externalId)
Sets the externalId value on the modal view object.
Signature
1 public Slack . ModalView . Builder externalId ( String externalId )
Parameters
externalId
Type: String
A custom identifier that must be unique for all views on a per-team basis.
Return Value
Type:Slack.ModalView.Builder
viewReference(viewReference)
Sets the view to be displayed in the modal.
Signature
1 public Slack . ModalView . Builder viewReference ( Slack . ViewReference viewReference )
Parameters
viewReference
Type: Slack.ViewReference
The view to be displayed in the modal.
Return Value
Type: Slack.ModalView.Builder
This feature is not generally available. It is not part of your purchased Services. This feature is subject to change, may be discontinued with no notice at any time in SFDC’s sole discretion, and SFDC may never make this feature generally available. Make your purchase decisions only on the basis of generally available products and features. This feature is made available on an AS IS basis and use of this feature is at your sole risk.