on 07-28-2014 12:34 PM
How to block journal entry posting
Hi Rajeesh...
Can you explain in detail what case you need to block the Journal..
sample for the dimensions...
IF @object_type = '30' AND @transaction_type = 'A'
BEGIN
IF EXISTS (SELECT
TransId
FROM jdt1 t1
WHERE @list_of_cols_val_tab_del = TransId AND (ISNULL(t1.ProfitCode, '') = '' OR ISNULL(t1.OcrCode2, '') = ''))
BEGIN
SET @error = -2
SET @error_message = 'Select the Dimensions and Departments'
END
END
Regards
Kennedy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Kennedy
below query is working for me.
IF @object_type = '30' AND @transaction_type = 'A'
BEGIN
IF EXISTS (SELECT
TransId
FROM OJDT t1
WHERE @list_of_cols_val_tab_del = TransId AND t1.RefDate>='20140710' )
BEGIN
SET @error = -2
SET @error_message = 'You are not authorize to add.No new posting is allowed in WILLIAMPENN!'
END
END
How do I block same way other transactions too?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this:
IF (@object_type = '30') and (@transaction_type IN (N'A'))
BEGIN
IF EXISTS (
SELECT TRANSID FROM OJDT A WHERE TransId = @list_of_cols_val_tab_del)
BEGIN
Select @error = 10, @error_message = N'You are not authorize to add this JE'
END
END
Thanks & 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 |
---|---|
91 | |
11 | |
10 | |
6 | |
5 | |
5 | |
5 | |
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.