GetLayoutObjectOwnerInfo

Returns a JSON object with ownership information about a layout object.

Format 

GetLayoutObjectOwnerInfo ( objectID )

Parameters 

objectID - text that specifies the Universally Unique Identifier (UUID) or the owner ID of a layout object.

Data type returned 

text

Originated in version 

19.2.2

Description 

This function searches for a layout object whose UUID or owner ID matches the objectID parameter and returns information about the object's owner. The following are considered owners of a layout object:

  • the layout the object is on

  • the add-on that the object is in, if applicable

When a layout object is added to a layout, it is assigned a UUID. When an instance of an add-on is added to a layout, it is assigned an owner ID. The value of the objectID parameter can be either the object's UUID or owner ID. See LayoutObjectUUID function.

If you're developing an add-on, you can use this function to get information at runtime about layout objects in an instance of your add-on.

In the following example of the returned JSON object, the layout object is in an instance of an add-on on the Tasks layout.

Copy
{
    "APIVers" : 1,
    "Object"
    {
        "UUID" : "D7C30E98-1924-4BF5-A263-53E9CD36862F",
        "Index" : 1,
        "Name" : "ActivityTimeLineWV_970E9CAE-D6FA-40DE-ACFA-14D110731F82",
        "Owners"
        {
            "Add-on"
            {
                "InstanceID" : "38EA3124-9CFD-4490-A634-A0A72A613145"
            },
            "Layout"
            {
                "UUID" : "D7C30E98-1924-4BF5-A263-53E9CD36862F",
                "Name" : "Tasks"
            }
        }
    }
}

The following table describes the elements in the returned JSON object.

JSON element

Description

APIVers

Numeric value for the version of this JSON object's structure. If the structure of this JSON object changes in a subsequent release, this number will change.

Object.UUID

UUID of the specified layout object

Object.Index

Index of the object on the layout (starting with zero)

Object.Name

Name of the layout object (see Naming objects)

Object.Owners
.Add-on.InstanceID

ID of the add-on instance the object is in. If the object isn't in an add-on, the Add-on element is not present.

Object.Owners
.Layout.UUID

UUID of the layout the object is on

Object.Owners
.Layout.Name
Name of the layout the object is on

Example 1 

Returns the JSON object shown above.

Copy
GetLayoutObjectOwnerInfo ( "970E9CAE-D6FA-40DE-ACFA-14D110731F82" )