cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction Notification Cannot Work

Former Member
0 Kudos

Hello,

I have use transaction notification for the make required field in Sales Quotation Table

Field is : Transaction Category in TAX TAB.

If there is required to select Transaction Category then after document add but here TN cannot work.

select @error, @error_message

begin

  if (select QUT12.Transcat from QUT12 where

  QUT12.DocEntry = @list_of_cols_val_tab_del) is null

  begin

  set @error = '1002'

  set @error_message = N'Please Enter Tranc Value'

  End

  End

end

Please Help me ASAP.

Thanks & Regards,

Nikunj Mehta

Accepted Solutions (1)

Accepted Solutions (1)

KennedyT21
Active Contributor
0 Kudos

Try this

IF(@object_type = '23' AND @transaction_type IN ('A', 'U'))

BEGIN

  IF EXISTS (

        SELECT DISTINCT T0.Transcat

        FROM   QUT12 T0

        WHERE  T0.DocEntry = @list_of_cols_val_tab_del

               AND isnull(T0.Transcat,'')='' )

    )

  BEGIN

     SELECT @error = -32,

            @error_message = 'Please Enter Tranc Value'

  END

END

Former Member
0 Kudos

Dear Kennedy,

It cannot work.

I try but it remain same.

Harshal's reply is also now work.

So where is actually i am wrong??

I put all this thing in SBO_SP_TransactionNotification.

But it now work.

Thanks & Regards,

Nikunj Mehta

Former Member
0 Kudos

Hi Nikunj,

Is it worked now ? You have not set the object type that was the reason it was not working.

Thanks,

Harshal

Former Member
0 Kudos

Hi Harshal,

This is not working, i have tried changing the Object type also.

Requesting you to plz help. \if you want i can share my screen with you.

I have tried in multiple databases, but still no result.

plz help.

regards,

Nikunj.

Former Member
0 Kudos

Hi,

None of the above SP is not working ?? Share your screenshot.

Thanks,

Harshal

KennedyT21
Active Contributor
0 Kudos

Try This

IF(@object_type = '23' AND @transaction_type IN ('A', 'U'))

BEGIN

  IF EXISTS (

        SELECT DISTINCT T0.Transcat

        FROM   QUT12 T0 inner join oqut t1 on t0.docentry=t1.docentry

        WHERE  T1.DocEntry = @list_of_cols_val_tab_del

               AND isnull(T0.Transcat,'')='' )

    )

  BEGIN

     SELECT @error = -32,

            @error_message = 'Please Enter Tranc Value'

  END

ENd

Former Member
0 Kudos

Hi Harshal,

Find the below given screen

the screen is attached, let me know if yo need to more info

Former Member
0 Kudos

Hi Keneddy,

The given code is also not working..

Let me know if you need more information.

thanks and regards,

Nikunj.

Former Member
0 Kudos

Hi Nikunj,

Given SP is perfectly working in my system.

As per your given screenshot, Just paste the SP above "ADD YOUR CODE HERE" and not below that.

Try and let me know.

Thanks,

Harshal

KennedyT21
Active Contributor
0 Kudos

Post the screen shot

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Nikunj,

Try below SP.

----- Mendetory fields for Trans category -----------

IF (@object_type = '23' AND @transaction_type IN ('A', 'U'))

BEGIN

  IF EXISTS ( SELECT distinct  T0.Transcat from QUT12 T0  where T0.DocEntry = @list_of_cols_val_tab_del and (T0.Transcat is null or T0.Transcat = ''))

  BEGIN

  SELECT @error = -32,

    @error_message = 'Please Define Trans Category for this transection.'

  END

END

----- End Mendetory fields for Trans category -----------------

Let me know the feedback.

Thanks,

Harshal

Former Member
0 Kudos

Dear Harshal,

It cannot work.

I try but it remain same.

Thanks & Regards,

Nikunj Mehta