[SOLVED] DynamicField update via soap

Moderator: crythias

Post Reply
gecelann
Znuny expert
Posts: 164
Joined: 12 Feb 2016, 08:05
Znuny Version: 5.0.0
Real Name: ann
Company: rghdinc

[SOLVED] DynamicField update via soap

Post by gecelann »

Hi to everyone,

I would like to ask if what is the correct attribute/tag for dynamic field in Otrs5 using webservice of soap?
Tried to use

Code: Select all

 $result = $this->__soapCall("Dispatch", array($this->_wsconf['username'], $this->_wsconf['password'],
   "DynamicFieldValueObject",  "ValueSet",
   "FieldID",      $fieldId,
   "ObjectID",   $ticketId,
   "Value",      array(
      "0" => array(
         "ValueText" => $value
      )
   ) ,
   "UserID",      1
  ));
but unfortunately it is not working. Please give me advice how to update dynamic field of valuedate.


Thanks alot!
Last edited by gecelann on 08 May 2017, 06:31, edited 1 time in total.
gecelann
Znuny expert
Posts: 164
Joined: 12 Feb 2016, 08:05
Znuny Version: 5.0.0
Real Name: ann
Company: rghdinc

[SOLVED] Re: DynamicField update via soap

Post by gecelann »

Hi,

Already resolved using this thread http://doc.otrs.com/doc/api/otrs/stable ... ue.pm.html
and this tags/attribute

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 "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,
    );

Thanks alot!!
Post Reply