Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

How to resolve the error “ non-static method cannot be referenced from a static context”?

Asked by Dan Peters Jul 31, 2023 885 views 1 answer
Share

About this question

The test class is given below:

@isTest private with sharing class Generatortest { @TestSetup static void create payload Test 

}}

On running the test , the below-mentioned error message is displayed

“ The non static method cannot be referenced from a static context: STring SSUDataJSONGenerator.createPayload(List, String)

What is the solution?

Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.