Create dynamic fields in product dropdown setting using otrs API

Hi, I am trying to create dynamic field using otrs api, and i also find some methods to create with object "common_object" and method "SetDynamicFieldValue()", details below: *SetDynamicFieldValue()* sets the value of a dynamic field. my $Result = $CommonObject->SetDynamicFieldValue( Name => 'some name', # the name of the dynamic field Value => 'some value', # String or Integer or DateTime format TicketID => 123 ArticleID => 123 UserID => 123, ); But error is come object CommonObject not found.... If any other way using api, so please help me. Regards,Anup

Hi Anup,
The $CommonObject refers to:
my $TicketCommonObject = Kernel::GenericInterface::Operation::Ticket::Common->new(
ConfigObject => $ConfigObject,
LogObject => $LogObject,
DBObject => $DBObject,
MainObject => $MainObject,
TimeObject => $TimeObject,
EncodeObject => $EncodeObject,
DebuggerObject => $DebuggerObject,
WebserviceID => $WebserviceID, # ID of the currently used web service
);
It is clear that "Ticket" prefix is missing, thanks for pointing this out, I suggest you to open a bug report for this so you can track the status of the fix for this issue.
But this will not answer you question, in fact your are looking at the GenericInterface API and this methods will not help you in your task. please take a look into
Kernel::System::DynamicField
and
Kernel::System::DynamicField::Backend
((enjoy))
Carlos Rodríguez
On Apr 1, 2013, at 5:45 AM, Anup Kandalkar
Hi,
I am trying to create dynamic field using otrs api, and i also find some methods to create with object "common_object" and method "SetDynamicFieldValue()", details below: SetDynamicFieldValue() sets the value of a dynamic field.
my $Result = $CommonObject->SetDynamicFieldValue( Name => 'some name', # the name of the dynamic field Value => 'some value', # String or Integer or DateTime format TicketID => 123 ArticleID => 123 UserID => 123, ); But error is come object CommonObject not found....
If any other way using api, so please help me.
Regards, Anup _______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
participants (2)
-
Anup Kandalkar
-
Carlos Rodríguez