Send a MMS Message from Apex
For sending MMS through a dev console or custom code, the following things are required:
- SMS History record is to be created with smagicinteract__Message_Type__c field as ‘MMS’
- The MMS Detail record is to be created with a lookup of the SMS History record that was created in the previous step
Refer the below sample script to send MMS:
smagicinteract__smsMagic__c smsobj = new smagicinteract__smsMagic__c(); smsobj.smagicinteract__PhoneNumber__c = '919623197650'; smsobj.smagicinteract__Unformatted_Phone_Number__c = '919623197650'; smsobj.smagicinteract__SenderId__c = 'SMSSenderId'; smsobj.smagicinteract__disableSMSOnTrigger__c = 0; smsobj.smagicinteract__SMSText__c = 'testSMS 2'; smsObj.smagicinteract__Message_Type__c = 'MMS'; smsObj.smagicinteract__MMS_Subject__c = 'Some random subject'; smsobj.smagicinteract__external_field__c = ApexAPI.generateUniqueKey(); insert smsObj; smagicinteract__MMS_Detail__c mmsObj = new smagicinteract__MMS_Detail__c(); mmsObj.smagicinteract__MMS_Filename__c = 'Image'; mmsObj.smagicinteract__MMS_Url__c ='; mmsObj.smagicinteract__SMS_History__c = smsObj.id; insert mmsObj;
6 Comments
Ηi Dear, are yoᥙ in fact visiting thiѕ weƅ site
on a regular basis, if so tһеn you will definitеly
get nice knowledge.
This is really interesting, You are a very skilled blogger.
I’ve joined your feed and look forward to seeking more of your great
post. Also, I have shared your site in my social networks!
I know this weƄ page provіdes quaⅼity depending aгticles or reviews and extra materіal, is there any
other website which gives such data in quality?
Thankѕ for sharing y᧐ur thoughts. I truly
appreciate your effоrts and I am waiting for your further write ups thank you once again.
Woᴡ! After all I got a blog from whеre I be aƅle to
genuinely obtain valuable data regarding my study and knowledge.
I c᧐uldn’t resist commenting. Well written!