Skip to main content
swapnar6405
February 17, 2023
Question

How to call/use a recordActionField, recrodActionItem in a button click.

  • February 17, 2023
  • 8 replies
  • 0 views

Hi,

I have an interface where I have few buttons. These buttons I have created using a a!buttonArrayLaoyout, a!buttonWidget.

Now, when the user clicks on one of the button, I need to calls a "recrodActionItem".

Can someone advise how I can do this.

Thanks

8 replies

mikes0011
Brainy
February 17, 2023

Record Action Items are placed / used separately.

swapnar6405
February 17, 2023

Hi,

I have the scenario like below.

I have a read-only grid where I am loading the data using recordType and on top of the grid, I have 2 buttons.

When any one clicks on "DELTE" button by selecting rows in the grid, I am using "deleteFromDataStoreEntities" to delete the rows of data in the database.  

When any one clicks on "Upload Documents" button, I want to call Record Action.

Is there away, I can call Record Action when the button clicked/pressed?

mikes0011
Brainy
February 17, 2023

Not directly.  You have to either use a Record Action item (called within a Record Action Field), to launch a related action direclty pertaining to a specified id (or maybe launch a contextless record list action that isn't specific to any record id), or you'd need to use a Start Process Link that takes the user into a new instance of a process model using whatever context you want.  You can't do the latter version using any button, while also taking the user directly into the process at least (a button could fire a "start process" call, which would launch a process instance in the background and the user would be able to see the task in their task list).

February 23, 2023

Hi

you can use this code to call record action button

  a!gridColumn(
          label: "Actions",
          value: a!recordActionField(
            actions: {
              a!recordActionItem(
                action: 'recordType!{601cd09c-9034-4f53-b4d3-8cdfd3116910}RMM Product.actions.{0b2a53d0-356e-4d90-906d-da522d48e9a8}Update',
                identifier: fv!row['recordType!{601cd09c-9034-4f53-b4d3-8cdfd3116910}RMM Product.fields.{4fba574e-b990-4f92-80c6-6fdbcbf14c4b}id']
              ),
              a!recordActionItem(
                action: 'recordType!{601cd09c-9034-4f53-b4d3-8cdfd3116910}RMM Product.actions.{35299b39-6699-4d2c-b4ca-f9911975cba8}Delete',
                identifier: fv!identifier
              )
            },
            style: "MENU_ICON",
            display: "ICON"
          ),
          align: "CENTER",
          width: "NARROW"
        ),

swapnar6405
February 23, 2023

Thank  you Kavita.

February 24, 2023

@swapnar6405   My Pleasure [emoticon:c4563cd7d5574777a71c318021cbbcc8]