How Get Column Customer_ID and place it in a variable

Moderator: crythias

Locked
mfileto
Znuny newbie
Posts: 7
Joined: 16 May 2013, 15:54
Znuny Version: 3.2.6
Real Name: Mauro Fileto
Company: NetCaster

How Get Column Customer_ID and place it in a variable

Post by mfileto »

Hi,

I would like some help in assigning the value of column customer_id (Table customer_user) into a variable $TixCustID so I can use it to do a select and get some data...
I am inside module CustomerTicketMessage.pm

Thank you very much.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: How Get Column Customer_ID and place it in a variable

Post by reneeb »

Code: Select all

my ($TixCustID) = $Self->{CustomerUserObject}->CustomerIDs(
    User => $Self->{UserID},
);
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
mfileto
Znuny newbie
Posts: 7
Joined: 16 May 2013, 15:54
Znuny Version: 3.2.6
Real Name: Mauro Fileto
Company: NetCaster

Re: How Get Column Customer_ID and place it in a variable

Post by mfileto »

Thank you very much for your prompt reply...

I applied your code and got this error message:

Global symbol "$Self" requires explicit package name at /opt/otrs/bin/cgi-bin/..[..]

Any ideas would be appreciated...
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: How Get Column Customer_ID and place it in a variable

Post by reneeb »

Please show the .pm file!
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
mfileto
Znuny newbie
Posts: 7
Joined: 16 May 2013, 15:54
Znuny Version: 3.2.6
Real Name: Mauro Fileto
Company: NetCaster

Re: How Get Column Customer_ID and place it in a variable

Post by mfileto »

Got it done... thanks... syntax error.
Locked