cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

block edit Customer Name after Customer Creation

kedalenechong
Participant
0 Likes
508

Hi All

How is it possible to block User edit Customer Name after Use has created the Customer in Business Partner Master Data?

 

 

Kedalene Chong

Accepted Solutions (0)

Answers (1)

Answers (1)

OlehFabri
Participant

Hello,

An example:

IF @object_type IN ('2')
AND @transaction_type IN ('U')
AND EXISTS (
SELECT
*
FROM
ACRD T1
INNER JOIN OCRD T0 ON T1.CardCode = T0.CardCode
WHERE
1 = 1
AND T0.CardCode = @List_of_cols_val_tab_del
AND T1.CardName <> T0.CardName
AND T0.CardType = 'C'
AND T1.LogInstanc = (
SELECT
MAX(LogInstanc)
FROM
ACRD
WHERE
CardCode = @List_of_cols_val_tab_del
)
) BEGIN
SELECT
@error= 1001,
@error_message = 'User is not allowed to modify BP Name'

 END

 

The error code used in example is 1001, you can use any integer value <> 0.

 

 

 

 

 

 

The error code used in example is 1001, you can use any integer value <> 0.

kedalenechong
Participant
0 Likes
Hi Oleh I tested but it doesnt prompt warning and I am able to edit Customer Name after adding