Trying to read dynamic field value of a ticket

Moderator: crythias

Locked
Philippdergro
Znuny newbie
Posts: 2
Joined: 25 Mar 2024, 04:01
Znuny Version: 7.0
Real Name: Philipp Schirling

Trying to read dynamic field value of a ticket

Post by Philippdergro »

Hi together,

i´m getting the ticketID of the actual created ticket by

Code: Select all

my ($Self, %Param) = @_;
my $TicketID = $Param{Data}->{TicketID};

then i get the ticketconfig with:

Code: Select all

my $DynamicFieldName = 'test';
my $DynamicFieldConfig1 = $Self->{DynamicFieldObject}->DynamicFieldGet(
       Name => $DynamicFieldName,
     );
    
then i want to get the dynamicfield value by:

Code: Select all

my $DynamicFieldValue = $Self->{BackendObject}->ValueGet(
    DynamicFieldConfig => $DynamicFieldConfig1,    
    ObjectID => $TicketID,   
        );
        
but $DynamicFieldValue is empty. If i hardcode the ID it works, like:

Code: Select all

my $DynamicFieldValue = $Self->{BackendObject}->ValueGet(
    DynamicFieldConfig => $DynamicFieldConfig1,    
    ObjectID => 123,   
        );
does anyone have a clue what i´m doing wrong?
i checked the value of $TickedID before and after and it´s correct.

thank you very much for your help
Philipp
Philippdergro
Znuny newbie
Posts: 2
Joined: 25 Mar 2024, 04:01
Znuny Version: 7.0
Real Name: Philipp Schirling

Re: Trying to read dynamic field value of a ticket

Post by Philippdergro »

got the solution on my own.
valueGet looks in the database. But when i´m looking for the information while i´m creating the ticket the field is empty....
sorry guys for that stupid stuff :)

but can tell me someone if there is a way to rrad the value of dynamic_Fields with the ticket create event?
Locked