Skip to main content
February 14, 2024
Question

Record Action Not getting refreshed after the action is complete

  • February 14, 2024
  • 3 replies
  • 0 views

Hi,

I have a record action which shows "Add Artwork Milestones" and after completing/adding the artwork details the record action should get updated to "Edit Artwork Milestones". But it is showing to Edit Artwork Milestones Action only after page refresh but not immediately after the action submission. 

I used a local variable to call the record action with a!refreshvariable() but still it is not getting updated dynamically without refreshing the screen. PFA code and help me resolving this issue.

a!localVariables(
  local!recordAction: a!refreshVariable(
    value: a!recordActionField(
      actions: {
        a!recordActionItem(
          action: 'recordType!{d1de8e89-4208-44d3-bb27-0306902c0671}RGRACSLBL Label Change Country.actions.{9cb9fc4e-57ad-4aaf-b21b-6dabf15c4a55}addOrUpdateArtworkDetails',
          identifier: ri!labelChangeCountry['recordType!{d1de8e89-4208-44d3-bb27-0306902c0671}RGRACSLBL Label Change Country.fields.{6c137b66-e39e-49a8-b443-3728d8ccd6a4}id']
        )
      },
      style: "MENU",
      display: "LABEL",
      align: "END"
    ),
    refreshAfter: "RECORD_ACTION",
    refreshAlways: true
  ),
  a!sectionLayout(
    contents: local!recordAction
  )
)

    3 replies

    venkatrea696188
    February 14, 2024

    Couple of questions , 1. Why you calling a UI component in Local variable??, 

    2.In that record action you have activity chaining  ?? 

    And one more suggestion don't use "Refresh Always" it will trigger unwanted refreshes and burdens the interface

    harshitb6843
    February 14, 2024

    I think she had the thought of refreshing the state of the record action using refresh variables. 

    [mention:eafad29ef2f94635b373ae8b9e875dbc:e9ed411860ed4f2ba0265705b8793d05] In order to make sure that the refresh happens, you will have to add the chaining in your process model till the node where this data is getting written to the DB, not after that. Doing this will ensure that all the chained nodes run before taking the user back to the screen.

    harshm4411
    February 14, 2024

    Hey, 

    Please verify the existence of chaining in the process model that is activated when executing the action.