Contextual Sidebar passing parameters to tab pages

cczernia
Mega Guru

I've created a tab page in a Contextual Sidebar but need access to the parameters (@context.props) of the page that sidebar is on. Can anyone point me in the right direction on how to access or pass these? Thanks.

1 REPLY 1

cczernia
Mega Guru

So I figured this out (by deconstructing  though I would like to think there is a better way of doing this in UI Builder and not editing json. If there is please let me know.

 

I noticed that Record Information did not have any properties (required or optional) in UI Builder.

 

When you view the sys_ux_macroponent record you see it does have properties in the properties field.

 

{
  "name" : "recordSysId",
  "label" : "recordSysId",
  "fieldType" : "string",
  "typeMetadata" : null,
  "valueType" : "string",
  "mandatory" : false,
  "defaultValue" : null,
  "description" : "",
  "readOnly" : false,
  "selectable" : false,
  "disabled" : false
}

 

In the related list "Parent Screens" you will see a referenced record to sys_ux_screen. In the field is Macroponent Configuration with this JSON.

  "recordSysId" : {
    "type" : "CONTEXT_BINDING",
    "binding" : {
      "address" : [ "sysId" ],
      "category" : "props"
    }
  },
  "recordTable" : {
    "type" : "CONTEXT_BINDING",
    "binding" : {
      "address" : [ "table" ],
      "category" : "props"
    }
  },

When I added this to my tab page configuration everything started to work. I'm assuming the "address" binds the new properties to the properties of the parent page.

 

Again, if someone knows an easier way to do this please post.