You need to sign in to do that
Don't have an account?
Rajaganagavel
Help on Apex get method to Json in Workbench
Hi Folks,
I have a custom object called Jobs with two fields namely Job_Name, Vacancies.
I want to create an apex rest class with get method and it should give the data in json format in workbench as below
{
"Master":"Jobs",
"Fields":["JobName,Vacancies"],
"Data": [["HR","10"],["Manager","20"]]
}
Please help me how to achieve using which json methods
I have a custom object called Jobs with two fields namely Job_Name, Vacancies.
I want to create an apex rest class with get method and it should give the data in json format in workbench as below
{
"Master":"Jobs",
"Fields":["JobName,Vacancies"],
"Data": [["HR","10"],["Manager","20"]]
}
Please help me how to achieve using which json methods
I hope that below link is useful to you .
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_rest_code_sample_basic.htm
Thank You,
www.nubeselite.com
Development | Training | Consulting
Please mark this as solution if your problem is solved.
Thanks,
Greetings to you!
I have gone through your query and I realized.
Please visit the link for solution:
1. https://developer.salesforce.com/forums/?id=9060G000000XhMLQA0
2. https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_rest_code_sample_basic.htm
3. https://webkul.com/blog/how-to-run-rest-api-through-workbench-salesforce/
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com
Thanks for your prompt response.
I tried creating as per requirement different object but im facing challenges. Could you please help me on this.
https://developer.salesforce.com/forums/ForumsMain?id=9062I000000XngZQAS