cancel
Showing results for 
Search instead for 
Did you mean: 

Need to block approval if a Reason, Remarks is not mentioned

Former Member
0 Kudos

Dear Experts

we had Approval Process for Delivery note Return, i need to the user to make it mandatory and force them to insert the Reason of Return in Approval ,

can an one give me the SPT for the same

Regards

Accepted Solutions (1)

Accepted Solutions (1)

former_member185682
Active Contributor
0 Kudos

Hi Shahan,

You can do this with the object type 122. A sample for your scenario.

IF @object_type = '122' AND @transaction_type IN ('A')
BEGIN
	IF (SELECT COUNT(*) FROM OWDD WHERE WddCode = @list_of_cols_val_tab_del AND ISNULL(Remarks, '') = '') > 0
	BEGIN
		SET @error = -1
		SET @error_message = N'It is necessary provide some remarks for approval procedure'
	END
END

Hope it helps.

Kind Regards,

Diego Lother

Answers (0)