Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
51 views

DMLEXCEPTION NOT BEING CAUGHT

I HAVE WRITTEN THE BELOW CODE BUT IT IS NOT THROWING THE MIXEDDMLEXCEPTION AND I DON'T UNDERSTAND WHY. public class April22Task2 { public static void createUserAndAccount() { //...
Md Talib's user avatar
0 votes
1 answer
271 views

Facing Mixed DML operation for apex class

I have written a scheduler for deactivating salesforce users who doesn't logged in for last 90 days. The code is working as expected if I remove exception logging into a salesforce object at line #14. ...
venky's user avatar
  • 417
1 vote
1 answer
532 views

MIXED_DML_OPERATION : Can not insert a user record from account trigger even when User Role is null

I am trying to create a community user in an after update trigger of account. I am setting the UserRoleId = null but still am getting MIXED_DML_OPERATION exception. As per documentation: You can ...
Sarang's user avatar
  • 2,665
6 votes
0 answers
234 views

Why inserting a user object and making callout in a test throws CalloutException in Production?

I stumbled upon strange behavior when executing tests on deployment to production organization. In the test, I first insert a User object, some other objects and then as the last one, a CampaignMember ...
Andrej Lucansky's user avatar