CA Service Management

 View Only

 Default Contraint for ca_contact doesn´t work

Fabian Basoalto's profile image
Fabian Basoalto posted Mar 28, 2023 06:29 PM

Hi everyone, i'm trying to set some default values on a "default contraint" for ca_contact table.

ex. contact_type=2307; notify_method1=1800;

But every time a contact is crated those values are saved nulls.

The data paartition is configured on employee role (default role)

Some idea ?

Thanks in advance.

Fabian

Vallinayagam Pitchaimani's profile image
Broadcom Employee Vallinayagam Pitchaimani

Fabian,

Can you please show us what is the extract constraint you have created ?

Probably screenshot of your constraint can help

Aleksandar Stancic's profile image
Aleksandar Stancic

Hi Fabian,

employee user cannot create user and having that in mind your constraint will never trigger.

You should create this constraint in data partition for role that actually create contact i.e. analyst or admin role

Fabian Basoalto's profile image
Fabian Basoalto
Lindsay Estabrooks's profile image
Lindsay Estabrooks

If you want these values to be set every time a contact is created, no matter who is doing it, create a file named zContact.mod in the ...\site\mods\majic folder with the following contents:

MODIFY cnt notify_ws1 ON_NEW DEFAULT 'wrkshft:400002';
MODIFY cnt notify_ws2 ON_NEW DEFAULT 'wrkshft:400002';
MODIFY cnt notify_ws3 ON_NEW DEFAULT 'wrkshft:400002';
MODIFY cnt notify_ws4 ON_NEW DEFAULT 'wrkshft:400002';
MODIFY cnt notify_method1 ON_NEW DEFAULT '1800';
MODIFY cnt notify_method2 ON_NEW DEFAULT '1800';
MODIFY cnt notify_method3 ON_NEW DEFAULT '1800';
MODIFY cnt notify_method4 ON_NEW DEFAULT '1800';
MODIFY cnt access_type ON_NEW DEFAULT '10005';
MODIFY cnt type ON_NEW DEFAULT '2305';

You will need to re-start Service Desk for this to take effect. The filename can be anything as long as it has the .mod extension.

Cheers,