function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mrunali GaonkarMrunali Gaonkar 

System.SecurityException: Empty key

Hi,

I am trying to send sms in apex trigger using smagicinteract package.its working fine after record updation but in test classes all execution goes fine and smagicinteract object also get inserted without errors as follwos
64]|DEBUG|listOfResonse(Database.SaveResult[getErrors=();getId=a11L00000079x1UIAQ;isSuccess=true;])
only am getting error at the end as follows,
13:35:41.615 (18615499664)|CODE_UNIT_FINISHED|Workflow:Lead
13:35:41.615 (18615705686)|DML_END|[31]
13:35:41.620 (18620308312)|ENTERING_MANAGED_PKG|smagicinteract
13:35:41.705 (18705643589)|FATAL_ERROR|System.SecurityException: Empty key

(System Code)




13:35:41.705 (18705665375)|FATAL_ERROR|System.SecurityException: Empty key

(System Code)
AB TestAB Test
Hi

please go through this link .. hope it helps 

https://developer.salesforce.com/forums?id=906F00000008ysEIAQ

Else as a bad fix you can remove the call of the sms system from the Test context (!Test.isRunningTest())

Hope it helps :)

Please mark the answer as best answer or like it if it helps :)
ErikduvetErikduvet
Did you find a fix for this? I am facing the same issue at the moment using SMS Magic.
MANJOT SINGH 7MANJOT SINGH 7
Hi,

This issue will occur if your SMS magic setup is not done. You can go to sms Home tab and can see the error of sms Settings.