Record Summary

Hi Everyone,

I am opening an interface 2 from interface 1 through record summary on click of link in interface 1. I need to have a cross icon in interface 2 upon clicking it, will open the first interface again. Can anyone please help me.

  Discussion posts and replies are publicly visible

  • 0
    Certified Senior Developer
    in reply to Rahul009

    Get rid of the recordLink() and use dynamic link instead as Mike suggested. Below is a reference, adjust according to your requirement.

    a!localVariables(
      local!employees: {
        a!map(
          id: 11,
          name: "Elizabeth Ward",
          dept: "Engineering",
          role: "Senior Engineer",
          team: "Front-End Components",
          pto: 15,
          startDate: today() - 500
        ),
        a!map(
          id: 22,
          name: "Michael Johnson",
          dept: "Finance",
          role: "Payroll Manager",
          team: "Accounts Payable",
          pto: 2,
          startDate: today() - 100
        ),
        a!map(
          id: 33,
          name: "John Smith",
          dept: "Engineering",
          role: "Quality Engineer",
          team: "User Acceptance Testing",
          pto: 5,
          startDate: today() - 1000
        ),
        a!map(
          id: 44,
          name: "Diana Hellstrom",
          dept: "Engineering",
          role: "UX Designer",
          team: "User Experience",
          pto: 49,
          startDate: today() - 1200
        ),
        a!map(
          id: 55,
          name: "Francois Morin",
          dept: "Sales",
          role: "Account Executive",
          team: "Commercial North America",
          pto: 15,
          startDate: today() - 700
        ),
        a!map(
          id: 66,
          name: "Maya Kapoor",
          dept: "Sales",
          role: "Regional Director",
          team: "Front-End Components",
          pto: 15,
          startDate: today() - 1400
        ),
        a!map(
          id: 77,
          name: "Anthony Wu",
          dept: "Human Resources",
          role: "Benefits Coordinator",
          team: "Accounts Payable",
          pto: 2,
          startDate: today() - 300
        ),
    
      },
      local!teamList: {
        "Accounts Payable",
        "User Acceptance Testing",
        "User Experience",
        "Commercial North America",
        "Front-End Components"
      },
      local!selection,
      local!readOnly: true,
      {
        a!sectionLayout(
          label: "Employees",
          contents: {
            a!gridField(
              data: local!employees,
              columns: {
                a!gridColumn(
                  label: "Name",
                  value: a!richTextDisplayField(
                    value: a!richTextItem(
                      text: fv!row.name,
                      link: a!dynamicLink(
                        saveInto: a!save(local!selection,fv!row)
                      )
                    )
                  )
                ),
                a!gridColumn(label: "Team", value: fv!row.team)
              },
              pageSize: 10,
    
            ),
    
          },
          showWhen: isnull(local!selection)
        ),
        a!sectionLayout(
          label: "Details",
          contents: {
            a!columnsLayout(
              columns: {
                a!columnLayout(
                  contents: a!richTextDisplayField(
                    value: a!richTextItem(
                      text: "No employee selected.",
                      color: "SECONDARY",
                      size: "MEDIUM",
                      style: "EMPHASIS"
                    ),
                    showWhen: isnull(local!selection)
                  )
                ),
                a!columnLayout(
                  contents: a!richTextDisplayField(
                    align: "RIGHT",
                    value: a!richTextIcon(
                      icon: "times",
                      color: "NEGATIVE",
                      link: a!dynamicLink(saveInto: a!save(local!selection, null))
                    )
                  )
                )
              }
            ),
            a!columnsLayout(
              columns: {
                a!columnLayout(
                  contents: {
                    a!textField(
                      label: "Name",
                      value: local!selection.name,
                      readOnly: true
                    ),
                    a!textField(
                      label: "Department",
                      value: local!selection.dept,
                      readOnly: true
                    )
                  },
                  width: "MEDIUM"
                ),
                a!columnLayout(
                  contents: {
                    a!textField(
                      label: "Role",
                      value: local!selection.role,
                      readOnly: local!readOnly
                    ),
                    if(
                      local!readOnly,
                      a!textField(
                        label: "Team",
                        value: local!selection.team,
                        readOnly: true
                      ),
                      a!dropdownField(
                        label: "Team",
                        choiceLabels: local!teamList,
                        choiceValues: local!teamList,
                        value: local!selection.team,
                        disabled: local!readOnly
                      )
                    )
                  },
                  width: "WIDE"
                )
              }
            )
          },
          showWhen: not(isnull(local!selection))
        )
      }
    )

    Please take a look at the Interface Recipes for similar ideas