Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9656

Re: How to set data validation to text box (edit text) in SAP B1 9.0 PL11 using SDK codes?.

$
0
0

Hi Rurangwa,

You are right, i can reproduce your problem.

It looks like it is an SAP bug, you might want to search the SAP kb and open up a support ticket for this.

I notice that if you have set this as mandatory, and add unique key, the mandatory is overridden.

Worse is that the employee record you have added with the empty UDF, can not be updated anymore.

SAP returns me 'Could not commit transaction: Error -1 detected during transaction '' (AHEM)'

 

 

For a workaround, you can remove the Unique key and remove the mandatory field.

Control only by Transaction Notification.

Paste the below to your SP_TransactionNotification. (Change the UDF field name accordingly)

 

--------------------------------------------------------------------------------------------------------------------------------
-- ADD YOUR CODE HERE
if @object_type='171' AND @transaction_type in ('A','U')
BEGIN  SELECT @Error = 999, @error_message = 'Field must be unique' FROM OHEM T0 WHERE T0.empID = @list_of_cols_val_tab_del  AND (ISNULL(T0.U_TWM_Test,'')=''  or exists (SELECT T1.empID FROM OHEM T1 WHERE T1.U_TWM_Test = T0.U_TWM_Test AND T1.empID <> T0.empID))  SELECT @error, @error_message
END
--------------------------------------------------------------------------------------------------------------------------------

Regards
Edy


Viewing all articles
Browse latest Browse all 9656

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>