![]() ![]() SmsObject.smagicinteract_Name_c = contact.Name // records name SmsObject.smagicinteract_PhoneNumber_c = contact.MobilePhone SmsObject.smagicinteract_SenderId_c = senderId Smagicinteract_smsMagic_c smsObject = new smagicinteract_smsMagic_c() String templateText = 'test SMS by Screen Magic' // you can fetch the template text by querying the record on smagicinteract_SMS_Template_c object String senderId = 'smsMagic' // Please replace the 'smsMagic' with your relevant sender ID. Feel free to copy it and modify it according to your environment. The trigger will also populate other fields in the SMS History object instance with default values. SMS-Magic provides a custom trigger that will (a) execute after the insertion of the record and (b) send out messages to the Mobile Number. The developer would first create an instance of the SMS History object, populate all required fields, and then insert the instance of that object using a database insert. Set its value as “OUT” for sending messages. With 1.49 onwards, this new field is used to indicate whether it’s an outgoing or incoming message. Identifier of the object from which the message will be sent This is indexed and unique field used as a reference to update delivery reports. If set 1, the trigger is deactivated, so the message won’t be sent, only a record will be created. Name of person to whom you are sending this message. Phone number of Contact/Lead to whom you are sending the message. Phonenumber or business identity of your business The following table contains fields that must be populated to successfully send messages from Apex: Name Considering the need for complex customization for implementing various business workflows, we have provided a simple way to send SMS from Apex code. ![]() There is a custom object in the SMSMagic Interact Managed package known as SMS History, and the corresponding API name is smagicinteract_smsMagic_c. Apex is a strongly-typed, object-oriented programming language that allows developers to execute flow and transaction control statements on the Salesforce Lightning Platform server, together with calls to the API.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |