cancel
Showing results for 
Search instead for 
Did you mean: 

making telephone No and contact person mandatory

Former Member
0 Kudos

the client whats the telephone fields and contact person mandatory in Business partner master data.When the user tries to add a new business partner

without an address the system should block them.

Please help

Accepted Solutions (1)

Accepted Solutions (1)

former_member197621
Active Contributor
0 Kudos

Hi,

Try below stored procedure to block Tel-1 and Contact person field is empty.


If (@object_type = '2') and @transaction_type IN ('U','A')

BEGIN

IF exists (select T1.cardcode FROM   OCRD T1

where T1.CardCode =@list_of_cols_val_tab_del and

(Isnull(t1.CntctPrsn,'') = '' or Isnull(t1.Phone1,'') = ''))

          Begin

               SET @error = 30

               SET @error_message =N'Tel-1 and Contact person should not be EMPTY.....'   

          end

END

Former Member
0 Kudos

Thank you so much

it has worked

Answers (1)

Answers (1)

KennedyT21
Active Contributor
0 Kudos

Try This TNSP...

If (@object_type = '2') and (@transaction_type IN ('A','U'))

BEGIN

IF exists (select T1.cardcode FROM   OCRD T1

where T1.CardCode =@list_of_cols_val_tab_del  and isnull(T1.CntctPrsn,'') <>''

or (isnull(Phone1,'')='' or ISNULL( Phone2,'')='')

))

          Begin

               SET @error = 30

               SET @error_message =N'You are not allowed to add without Cntper details' 

          end

END

Hope Helpful

Regards

Kennedy