Why nonstatic method cannot be referenced from a static context in testclass?
To avoid this error, you can directly call the method without the instance. Addcontroller.saveContacts(conts); Also, in your saved contacts method, you are inserting and updating the contacts which you can combine together. get the current user contact accountId and assign it to the contacts before the insert. no need…
Answered Aug 8, 2021 · 1.3K Views Read answer →