I'm currently working on a custom module for OTRS and I'm trying to update some of the ticket's properties. For updating them, I've followed https://otrs.github.io/doc/api/otrs/6.0 ... te.pm.html
The only things I still could not change (for the ones I tried) are the dynamic fields.
The error message I get is "TicketUpdate.InvalidParameter: TicketUpdate: DynamicField->Name parameter is invalid!". I tried usiing both the name of the field "MyTestField" and it's composed form (retrieved from TicketGet) "DynamicField_MyTestField". Both return the same message. I don't really know what name I should look for but the one I gave.
Any tips?
Also, there's something else I'm wondering and will just ask about this "WebserviceID", what's really up to it? I can choose the ID or some of the IDs have specific meanings? Couldn't really find the answer by now..
Thanks in advance!
Code: Select all
my $DebuggerObject = Kernel::GenericInterface::Debugger->new(
DebuggerConfig => {
DebugThreshold => 'debug',
TestMode => 0,
},
WebserviceID => 254,
CommunicationType => 'Provider',
);
my $updateObj = Kernel::GenericInterface::Operation->new(
DebuggerObject => $DebuggerObject,
Operation => 'TicketUpdate',
OperationType => 'Ticket::TicketUpdate',
WebserviceID => 254,
);
my $Result = $updateObj->Run(
Data => {
SessionID => $Self->{SessionID},
TicketNumber => XXXXXXXXXX',
DynamicField => {
Name => 'MyTestField',
Value => "foo",
},
Ticket => {
PriorityID => 2,
},
},
);