You need to sign in to do that
Don't have an account?
Kimberly Wargo 1
Need help with some Apex Test Trigger that is failing
Good Morning,
I am not knowledgable on Triggers. I have a test trigger that is failing in my org that seems to be locking up records on my bulk import. Can anyone clue me in on where to start looking to see why now it is failing?
Thanks
Kim
I am not knowledgable on Triggers. I have a test trigger that is failing in my org that seems to be locking up records on my bulk import. Can anyone clue me in on where to start looking to see why now it is failing?
Thanks
Kim
System.DmlException: Insert failed. First exception on row 0; first error: INVALID_FIELD_FOR_INSERT_UPDATE, Household may not use Household field : Investment Associate: [Investment Associate]
Stack Trace: Class.testSetHHPendingFISClient.testThis: line 6, column 1
There is another class testSetHHPendingFISClient and there is an error for inserting a Household with the field "Investment Associate" (missing or problem of security for this field, not visible)
Regards
System.DmlException: Insert failed. First exception on row 0; first error: INVALID_FIELD_FOR_INSERT_UPDATE, Household may not use Household field : Investment Associate: [Investment Associate]
Stack Trace:
Class: testSetHHPendingFISClient
Method: testThis: line 6, column 1
Regards
Here is my test class
setup > 'classes' (quick search) Apex Classes : letter 'T' and you will find: testSetHHPendingFISClient but that could be a class from an installed package perhaps so you cannot see the source code (but the name only).
Regards
Grrrr
It is not an easy problem indeed. We have to look at all the triggers and flows on Account now (bad news).
Your test class never creates directly an Household with the field : Investment Associate: [Investment Associate].
So this creation of Household is done by an other trigger on Account or a process/flow (perhaps unwanted and should be unactivated).
setup > Account (quick search) > Triggers : there should be other triggers (copy/paste their code)(very common).
setup > Process builder : look at your processes (less common than triggers but quite easy to understand)
setup > Flows : look at your flows (rare and more complicated than the previous processes)
We can unactivate this unwanted trigger/process/flow as soon as we have found it.
Regards
I did some digging and this is a pretty big nut to crack. When our initial implenetation was done, the firm that did it installed several "hidden" packages that seem to tie in to many other objects. I need to work in my sandbox and unravel them all. I tried some this morning doing a few and it's pretty massive. They set us up with people accounts and I think when I do the unravel I would like to move that back over to Business accounts at the same time. In the interim I will muddle through until I have the time to devote to this without affecting my day to day operation.
Thank you sincerely for your help.
Kim