How to work with custom mail template?

Hello experts!

 

We wrote a script, the result from this script, we want it to be displayed in the letter that is sent to the user by event.

 

I created a mail template, i write                  $SCRIPT(ССС_Test)$

The recipient receives                                   $SCRIPT(ССС_Test)$

 

And there must be a value, how to fix it?

Parents Reply
  • The script you are calling needs to have one parameter only and this parameter needs to be of type ISingleDBObject or IEntity.

    In addition, you need to add a BaseObjectTypeAttribute to the script containing the type of the base object. In your case Person.

    Sample:

    <BaseObjectTypeAttribute("Person")> _
    Public Function CCC_Test( ByVal myEntity As IEntity) As String
    	Return "My return string"
    End Function

Children