Skip to Content
0

Changing Email subject dynamically after adding Sales Document

Feb 06 at 06:37 AM

39

avatar image
Former Member

Hi,

I just want to change email subject as 'Sales Quotation (Document number) (Customer Name)' whenever I add the sales quotation.

I write query into SBO_SP_TransactionNotification,it only affects the Email subject in Per document as shown in

But when I add Sales Quotation and click on mail option it doesn't reflect in Subject

Please help me to out this

Regards,

Sapna

per-document.jpg (65.2 kB)
on-mail.jpg (33.4 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Nagarajan K Feb 06 at 11:52 AM
0

Hi,

Try to assign below query in Email subject by using User Defined values,

SELECT T0.Emailsbj FROM ADP1 T0 WHERE t0.objtype = 23

Regards,

Nagarajan

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Nagarajan,

Where were I write this query..in Query generator or SBO_SP_TransactionNotification?

I already wrote following code in SBO_SP_TransactionNotification

Declare @emailSubject nvarchar(150)

If @transaction_type IN ('A') AND (@Object_type = '23')
Begin
If Exists(select * from OQUT T0 WHERE T0.[DocEntry] = @list_of_cols_val_tab_del and (CONVERT(VARCHAR,
T0.CREATEDATE,103) = CONVERT(VARCHAR,GETDATE(), 103)))
Begin
set @emailSubject='Sales Quaotation '+(select top 1 (convert(nvarchar(50),DocNum)) +' '+ CardName from OQUT order by DocEntry desc)

update ADP1
set ADP1.EmailSbj=@emailSubject 
where ADP1.ObjType=23 

END
END 

0