Quantcast
Viewing all articles
Browse latest Browse all 2638

Re: How to make project column mandatory for specific Customers

Hi Pascale,

 

The ABC This is in case that you want a UDF field in the customer master data saying for example Project mandatory Y/N. In this case you would have a flagin the customer saying if the project is mandatory. Then all the customers thatyou wanted to have a project mandatory should have a "Y" in the master data.

 

If you don't want to use the UDF just change to

IF @OBJECT_TYPE ='13'AND

(@TRANSACTION_TYPE = 'A' or @TRANSACTION_TYPE = 'U')

BEGIN

IFEXISTS(

SELECTdocentry from OINV T0 inner join INV1 T1 on T0.DocEntry = T1.DocEntry where T0.CardCode In ('CUS001', 'CUS002', 'CUS003')and T0.DocEntry = @LIST_OF_COLS_VAL_TAB_DEL and (T1.Project IS null or T1.Project = ''))

BEGIN

SELECT @ERROR=1,@ERROR_MESSAGE='the project is mandatory for this customer'
END

END

 

Hope it helps


Viewing all articles
Browse latest Browse all 2638

Trending Articles