Timeline for Assert Fail - Works in Sandbox but create issue while deploying in production
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 16, 2015 at 16:04 | comment | added | cropredy |
It is very tricky writing robust asserts when Process Builder is involved in the transaction and Users are in play. In testmethods, you can mock new Users but all Users are available to the test (and processes) so one can run into order dependencies when queries are issued between sandbox and PROD. Sometimes in situations above, I change the last assert to a not equals user1.id so I know that some different owner was assigned to the user that I mocked
|
|
Oct 16, 2015 at 10:19 | answer | added | Dan Jones | timeline score: 3 | |
Oct 16, 2015 at 10:11 | comment | added | Dan Jones | So it's automatically assigning the users to the case? Would make sense given you're returning an Id anyway. So, I'd look at who it's assigning it to and the criteria you've specified to assign users to cases. Why should this particular user be assigned to this particular case within your process builder. | |
Oct 16, 2015 at 10:08 | comment | added | Salesforce Steps | I have process builder for that. and its doing its work just fine | |
Oct 16, 2015 at 10:02 | comment | added | Dan Jones | Might be missing something here but you're not setting the Owner of the Case to an Id of a user you created? | |
Oct 16, 2015 at 9:53 | history | asked | Salesforce Steps | CC BY-SA 3.0 |