Skip to main content
May 8, 2024
Question

Dialog box in interface

  • May 8, 2024
  • 2 replies
  • 0 views

I have an interface where I have read only grid.

Now, when the user clicks on Completed Status . I want a way to open the interface as a dialog, if there is a way please let me know.

I tried with a!recordactionfield but not able to achieve this .

a!gridColumn(
          label: "Status",
          sortField: 'recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{status}status',
          value: a!richTextDisplayField(
            value: a!richTextItem(
              text: if(
                a!isNullOrEmpty(
                  fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{status}status']
                ),
                "",
                fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{status}status']
              ),
              link: if(
                and(fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{status}status'] = cons!CDM2_VAL_TARGET_STATUS[2],fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{searchBy}searchBy']<>cons!CDM2_SEARCH_BY_OPTIONS[5]),
                a!safeLink(
                  label: "",
                  uri: rule!CDM2_ER_getAllInOneReportLink() & fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{id}id'] & "?repType=all",
                  openLinkIn: "NEW_TAB"
                ),
               
               a!dynamicLink(
                 label:"",
                 value:
                a!recordActionField(
                  actions:a!recordActionItem(
                    action:'recordType!{6d7edf3a-4632-432d-bae9-5e7daf0df4e8}Target_Record.actions.{0e6b7746-0abf-4994-9c04-00ab7d18eafd}ReportLink',
                    identifier:fv!row['recordType!{6d7edf3a-4632-432d-bae9-5e7daf0df4e8}Target_Record.fields.{id}id']
                  )
                ))
              
              ),
              color: if(
                searchb(
                  "Error",
                  fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{status}status']
                ) <> 0,
                "NEGATIVE",
                {
                  a!match(
                    value: fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{status}status'],
                    equals: cons!CDM2_VAL_TARGET_STATUS[2],
                    then: "POSITIVE",
                    equals: cons!CDM2_VAL_TARGET_STATUS[4],
                    then: "#434343",
                    equals: cons!CDM2_VAL_TARGET_STATUS[3],
                    then: "#434343",
                    default: if(
                      fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{status}status'],
                      "",
                      "#FFBF00",

                    ),

                  )
                }
              )
            )
          ),
          align: "CENTER"
        ),

Thanks

    2 replies

    May 8, 2024

    Instead of creating a a!richTextDisplayField and using dynamic links,  You can make use of a!recordActionField in the a!gridcolumn under value parameter. The display parameter in the a!recordActionField allows you choose between dialog, same tab, new tab.

    mikes0011
    Brainy
    May 8, 2024

    please avoid creating duplicate posts for the same topic - they all show up on the same front page.