Internal Message SQL to recipient who manages the account Answered

Dean Jackson

Hi, 

I have created an internal message to alert when a new invoice has been created and when a business partner has been amended from active or inactive. 

Currently, this message only goes to a selected user and for the invoices I have been trying to get the internal message to alert the sales employee on the invoice. 

Likewise with the account active or inactive, I have been trying to make the alert only go to the person that holds the account. 

Please can any guidance be made on the correct SQL?

Comments

2 comments

  • Comment author
    Yaremi Miranda Lopez
    • Official comment

    Hello Dean,

    As Nadav mentioned, you can use SQL to set the user that will receive the message. If you open the help, you will find an example.

     

  • Comment author
    Nadav Caridi

    Hi , 

    example in the help file isn't working for you ? (invoice) 

    You can use the SQL: syntax
    Example: 'SQL:SELECT USER_CODE FROM OUSR WHERE INTERNAL_K = $[OINV.UserSign]' will on an invoice send an internal message to the person who created the Invoice (UserSign)
    Tip: You can let your SQL sentence return multiple rows of usernames and then send to each of them

    if you need the email from the sales employee you can just query OSLP : 

    SQL:SELECT TOP 1 o.Email FROM OSLP o WHERE o.SlpCode=$[ORDR.SlpCode]

     

    0

Please sign in to leave a comment.