cancel
Showing results for 
Search instead for 
Did you mean: 

Name field as Mandatory in UDT

Former Member
0 Kudos

Dear Team,

We are using SAP Business One 9.3.I have created a UDT for new master and my Question is how to set the Name field as Mandatory ?

Whether it is possible with out using SDK ?

Thanks in Advance

Raghu.k


Accepted Solutions (0)

Answers (2)

Answers (2)

Abdul
Active Contributor
0 Kudos

You can do it by sql also you need to deploy a SBO transaction notification in SAP B1 database or while creating UDF you can mark it mandatory on UDF window

former_member390407
Contributor
0 Kudos

Hello,

Yes you can use the standard stored procedure called SP_TransactionNotification. You just need to check if the name field is filled. Object type for UDT will be -3<tab>TableName. For example for a table called "@TEST" the script will be like this:

IF @object_type = '-3	@TEST'
BEGIN
	SELECT TOP 1 @error = 1,
		@error_message = 'Field name must be filled'
	FROM [@TEST]
	WHERE [@TEST].Code = @list_of_cols_val_tab_del
		AND ISNULL([@Test].[Name], '') = ''
END

More information you can find here: https://blogs.sap.com/2009/05/22/the-sptransactionnotification-stored-procedure/