SMS send

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • animax
    Senior Member
    • Jun 2018
    • 155

    SMS send

    Hi,

    This is probably a very simple problem, but somehow it doesn't work...

    It's about sending SMS out of a workflow. I set this up with my provider Sms77 and it works wonderfully.

    I use the following script in the workflow, which Espo specifies as follows:
    ---

    $body = 'Hi! This is an SMS notification from EspoCRM.';

    // Phone number is obtained from the entity.
    $phoneNumber = phoneNumber;

    $smsId = record\create(
    'text',
    'to', $phoneNumber,
    'body', $body
    );

    ext\sms\send($smsId);

    ---

    However, I would now like the variable $body not to be fixed text, but to send me 2 fields from the entity separated by a space.

    I thought I'd take care of that
    $body = fieldname1 + ' ' + fieldmane 2;

    but that doesn't work.

    How can I affect $body accordingly?​
  • abidoss
    Senior Member
    • Mar 2023
    • 230

    #2
    $body = string\concatenate(fieldname1, ' ', fieldnam2);

    Comment

    • animax
      Senior Member
      • Jun 2018
      • 155

      #3
      Works great! Thank you very much!

      Comment

      Working...