Triggers: Difference between revisions

92 bytes removed ,  6 October 2016
m
no edit summary
mNo edit summary
mNo edit summary
Line 438: Line 438:


<source lang="javascript" line>
<source lang="javascript" line>
msg = "Dear, " + entry().field("ContactName") + "\n" + entry().field("Notes") // Form the message from ContactName & Notes
msg = "Dear, " + entry().field("ContactName") +
i = intent("android.intent.action.SENDTO")                                   // Create intent object to open the app for sending
    "\n" + entry().field("Notes")                 // Form the message from ContactName & Notes
i.data("smsto:"+entry().field("Phone"))                                       // Provide the phone number in format smsto:number
i = intent("android.intent.action.SENDTO")       // Create intent object to open the app for sending
i.extra("sms_body" , msg)                                                     // Insert the text of the message to sms_body
i.data("smsto:"+entry().field("Phone"))           // Provide the phone number in format smsto:number
i.send()                                                                     // Send the message
i.extra("sms_body" , msg)                         // Insert the text of the message to sms_body
i.send()                                         // Send the message
</source>
</source>