cancel
Showing results for 
Search instead for 
Did you mean: 

Making address field mandatory in business Partner master data

Former Member
0 Kudos

When creating a business partner the client wants the system to block a user who adds a new business partner with no address into the system.

in other words he wants that field to be mandatory on creating new BPs

Any one with an answer can help

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can fulfill your requirement using SP_TransactionNotification.

GO

/****** Object:  StoredProcedure [dbo].[SBO_SP_TransactionNotification]    Script Date: 01/15/2014 18:11:26 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER proc [dbo].[SBO_SP_TransactionNotification]

@object_type nvarchar(20), -- SBO Object Type

@transaction_type nchar(1), -- [A]dd, [U]pdate, [D]elete, [C]ancel, C[L]ose

@num_of_cols_in_key int,

@list_of_key_cols_tab_del nvarchar(255),

@list_of_cols_val_tab_del nvarchar(255)

AS

begin

-- Return values

declare @error  int -- Result (0 for no error)

declare @error_message nvarchar (200) -- Error string to be displayed

select @error = 0

select @error_message = N'Ok'

--------------------------------------------------------------------------------------------------------------------------------

-- ADD YOUR CODE HERE

--------------------------------------------------------------------------------------------------------------------------------

if(@object_Type='2' and @transaction_type in ('A','U'))

begin

if(not exists (select crd1.address from crd1 where crd1.cardcode=@list_of_cols_val_tab_del))

begin

set @error=1

set @error_message='Address is compulsory'

end

end

-- Select the return values

select @error, @error_message

end

Hope this will help you to meet your requirement.

Regards

Manoj

Answers (1)

Answers (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Above SP_TN is perfect to block BP without address.

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

Thanks Nagarajan

Regards

Manoj