Set dynamic field value

Moderator: crythias

Locked
richardn
Znuny newbie
Posts: 16
Joined: 16 May 2012, 09:05
Znuny Version: 3.2.2

Set dynamic field value

Post by richardn »

Hi,

im working on some tests.

My Problem is i cant seem to set a DynamicField.

$BackendObject->ValueSet(
DynamicFieldConfig => $Field5Config,
ObjectID => 15,
Value => 'ticket1_field1',
UserID => 1,
);

How can i define $Field5Config for my existing DynamicField 'Word'?
OTRS 3.2.2 - CentOS - MySQL
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Set dynamic field value

Post by crythias »

Code: Select all

ValueSet()

sets a dynamic field value. This is represented by one or more rows in the dynamic_field_value
table, each storing one text, date and int field. Please see how they will be returned by
L<ValueGet()>.

    my $Success = $DynamicFieldValueObject->ValueSet(
        FieldID  => $FieldID,                 # ID of the dynamic field
        ObjectID => $ObjectID,                # ID of the current object that the field
                                              #   must be linked to, e. g. TicketID
        Value    => [
            {
                ValueText          => 'some text',            # optional, one of these fields must be provided
                ValueDateTime      => '1977-12-12 12:00:00',  # optional
                ValueInt           => 123,                    # optional
            },
            ...
        ],
        UserID   => $UserID,
    );
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked