Hi Kjetil,
The only thing I can think of is a TransactionNotification to verify that all the boxes are
Open up your SQL Management Studio, backup your database, push the + next to the database and select 'Programmability >> Stored Procedures >> SBO_SP_TransactionNotification' then right click and select 'Modify.'
Where it says "-- ADD YOUR CODE HERE" paste the following:
--MJT: For blocking AR Credit Memos with incorrect Without Qty Posting checkbox settings per row IF (@transaction_type = 'A' OR @transaction_type = 'U') AND @object_type = '14' BEGIN IF EXISTS(SELECT T0.[NoInvtryMv] FROM dbo.RIN1 T0 INNER JOIN ORIN T1 ON T0.DocEntry = T1.DocEntry WHERE T0.[NoInvtryMv] <> 'Y' AND T1.[DocType] = 'I' AND T0.DocEntry = @list_of_cols_val_tab_del) BEGIN SELECT @error = 1, @error_message = 'Please check the Without Qty Posting checkbox for all rows [AR Credit Memo - Without Qty Posting] [Message 60110-25]' END END
Then click "Execute" and it should save your validation. If the user does not check all the boxes it will block them from adding.
If you want to allow them to bypass this you would just make a UDF on the document row with a label like "Override No Stock" and then just set a dropdown with the following details:
Title: OverRide
Description: Override No Stock
Structure: Alphanumeric
Length: 10
Check the box for 'Set Valid Values for Field' and use the following:
Code | Name |
---|---|
Y | Yes |
N | No |
Set 'Set Default Value for Field' to 'Y' and add.
Then use the following code:
--MJT: For blocking AR Credit Memos with incorrect Without Qty Posting checkbox settings per row IF (@transaction_type = 'U' or @transaction_type = 'A') AND @object_type = '14' BEGIN UPDATE RIN1 SET NoInvtryMv = 'Y' WHERE docentry = @list_of_cols_val_tab_del END IF (@transaction_type = 'A' OR @transaction_type = 'U') AND @object_type = '14' BEGIN IF EXISTS(SELECT T0.[NoInvtryMv] FROM dbo.RIN1 T0 INNER JOIN ORIN T1 ON T0.DocEntry = T1.DocEntry WHERE T0.[NoInvtryMv] <> 'Y' AND T1.[DocType] = 'I' AND T0.[OverRide] <> 'Y' AND <> T0.DocEntry = @list_of_cols_val_tab_del) BEGIN SELECT @error = 1, @error_message = 'Please check the Without Qty Posting checkbox for all rows [AR Credit Memo - Without Qty Posting] [Message 60110-25]' END END
Other than that you would have to use an SDK add-on to check the box by default. I can't see any other way to do it through the native UI.
Mike