[Solved] Validate Customer ID

Moderator: crythias

Post Reply
th13fp45s
Znuny newbie
Posts: 27
Joined: 14 May 2012, 16:22
Znuny Version: 3.3.x
Real Name: Alexandre Muzzio

[Solved] Validate Customer ID

Post by th13fp45s »

Hi,

There some way to validate the Customer ID on new clients? Something like a combo box? Because of this, its possible to create a new cliente with a non-existent Customer ID, the field is mandatory but it is not verified.

Regards
Last edited by th13fp45s on 01 Jun 2012, 02:56, edited 1 time in total.
th13fp45s
Znuny newbie
Posts: 27
Joined: 14 May 2012, 16:22
Znuny Version: 3.3.x
Real Name: Alexandre Muzzio

Re: Validate Customer ID

Post by th13fp45s »

Please, anyone have this problem?
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Validate Customer ID

Post by jojo »

check the Company Feature Setting as described in Defaults.pm
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
th13fp45s
Znuny newbie
Posts: 27
Joined: 14 May 2012, 16:22
Znuny Version: 3.3.x
Real Name: Alexandre Muzzio

Re: Validate Customer ID

Post by th13fp45s »

jojo, thanks for you answer, but I read all Defaults.pm and didnt find.

You mean this code:

Code: Select all

$Self->{CustomerCompany} = {
        Params => {
            # if you want to use an external database, add the
            # required settings
#            DSN => 'DBI:odbc:yourdsn',
#            DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
#            User => '',
#            Password => '',
            Table => 'customer_company',
#            ForeignDB => 0,    # set this to 1 if your table does not have create_time, create_by, change_time and change_by fields
        },

        # company unique id
        CustomerCompanyKey          => 'customer_id',
        CustomerCompanyValid        => 'valid_id',
        CustomerCompanyListFields   => [ 'customer_id', 'name' ],
        CustomerCompanySearchFields => ['customer_id', 'name'],
        CustomerCompanySearchPrefix => '',
        CustomerCompanySearchSuffix => '*',
        CustomerCompanySearchListLimit => 250,
        Map                       => [

# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
            [ 'CustomerID',             'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
            [ 'CustomerCompanyName',    'Company',       'name',        1, 1, 'var', '', 0 ],
            [ 'CustomerCompanyStreet',  'Street',     'street',      1, 0, 'var', '', 0 ],
            [ 'CustomerCompanyZIP',     'Zip',        'zip',         1, 0, 'var', '', 0 ],
            [ 'CustomerCompanyCity',    'City',       'city',        1, 0, 'var', '', 0 ],
            [ 'CustomerCompanyCountry', 'Country',    'country',     1, 0, 'var', '', 0 ],
            [ 'CustomerCompanyURL', 'URL', 'url', 1, 0, 'var', '$Data{"CustomerCompanyURL"}', 0 ],
            [ 'CustomerCompanyComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
            [ 'ValidID',                'Valid',   'valid_id', 0, 1, 'int', '', 0 ],
        ],
    };
I have used this code when I need to integrate OTRS with LDAP, can you be more specific?

Thanks in advance.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Validate Customer ID

Post by jojo »

There is a line

# CustomerCompanySupport => 1,

which needs to be activated in you customer part
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
th13fp45s
Znuny newbie
Posts: 27
Joined: 14 May 2012, 16:22
Znuny Version: 3.3.x
Real Name: Alexandre Muzzio

[Solved] Validate Customer ID

Post by th13fp45s »

Thank you so much jojo! It worked perfectly!
Post Reply