on 01-13-2017 7:55 AM
Good Day!
Hi Experts, Correct my code please. I cant get the notification on my SPTN Blocking Backdated posting in A/R and some of the transaction. Please see my Code Below:
if @transaction_type = 'A' and @object_type = '13'
begin
if exists(select T0.DocDate, T0.DocEntry from
dbo.OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OUSR T3 ON T0.UserSign = T3.USERID
where T0.docentry = @list_of_cols_val_tab_del and datediff(dd, T0.[DocDate],current_timestamp)<1 and t3.USER_CODE = 'Manager')
begin
SET @error = 13
SET @error_message = N'You are not allowed to post this transaction.'
end
END
Hi,
Try this,
if @transaction_type = 'A' and @object_type = '13'
begin
if exists(select T0.DocDate, T0.DocEntry from
dbo.OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OUSR T3 ON T0.UserSign = T3.USERID
where T0.docentry = @list_of_cols_val_tab_del and datediff(dd, T0.[DocDate],Getdate() )<1 and t3.USER_CODE = 'Manager')
begin
SET @error = 13
SET @error_message = N'You are not allowed to post this transaction.'
end
END
Have you tried with standard function under Document settings-->Block documents with earlier Posting Date
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.