Kernel::WebApp::Controller::API::Role::HandlesDynamicFields

NAME

Kernel::WebApp::Controller::API::Role::HandlesDynamicFields – Role that provides methods to easier deal with dynamic fields.

PUBLIC INTERFACE

DynamicFieldObjectsGet()

This method returns the dynamic field objects as an array reference.

    my $DynamicFieldsConfig = $Self->DynamicFieldObjectsGet(
        Valid                     => 1,
        ObjectType                => [ 'Ticket', 'Article' ],
        FieldDisplay               => $Self->_TicketDetailViewConfig()->{FollowUpDynamicField} || {}, # optional
        SupportsExternalInterface => 1,                                                               # optional
    );

CustomerDynamicFieldObjectsGet()

This method returns the dynamic field objects as an array reference only for the fields that are designed for the external interface.

    my $DynamicFieldsConfig = $Self->CustomerDynamicFieldObjectsGet(
        Valid       => 1,
        ObjectType  => [ 'Ticket', 'Article' ],
        FieldDisplay => $Self->_TicketDetailViewConfig()->{FollowUpDynamicField} || {},   # optional
    );

DynamicFieldSchemaApplyACLs()

This method applies the ACLs to the given dynamic field.

    $Self->DynamicFieldSchemaApplyACLs(
        Field                => $DynamicField,
        Schema               => {...},
        PossibleValuesParams => {
            RequestData => {...},
            ObjectID    => 123,
            Context     => 'agent',
        },
        ACLParams => {
            TicketData      => {...},
            TicketID        => 123,
            EndpointContext => 'abc',
            UserIDKey       => 'UserID',
            UserIDValue     => 123,
        },
    );
Scroll to Top