Page 1 of 1

Need help with PMFSendMessage

Posted: Fri Apr 26, 2019 3:58 am
by seallaes
Hello!
There is a code in the trigger:
$app = @@APPLICATION;
@@caseNumber = $result[1]['APP_NUMBER'];
PMFSendMessage($app, "processmaker <[email protected]>", "[email protected], [email protected]","", "","RFC {@@caseNumber} impact system ATMain", "test");

Most often it works correctly and writes the case number:
"RFC 123 impact system ATMain"

But sometimes gives this:
"RFC {pmToString(Array['caseNumber'])} impact system ATMain"

Why can this happen?

Re: Need help with PMFSendMessage

Posted: Fri Apr 26, 2019 4:30 pm
by amosbatto
It is not recommended to insert case variables inside strings. Try it this way:

PMFSendMessage($app, "processmaker <[email protected]>", "[email protected], [email protected]", "", "",
"RFC "[email protected]@caseNumber." impact system ATMain", "test");

Re: Need help with PMFSendMessage

Posted: Wed May 15, 2019 10:28 am
by seallaes
Thanks. I wIll try it.