You need to sign in to do that
Don't have an account?

fetch user details
How to fetch user details with user "(username,email)and opportunity(id,stagename) object fields based on username by using JSON
You need to sign in to do that
Don't have an account?
Hi Nikki,
So basically your question is a bit uncleared but still, I managed to solve it. So basically, I could think of two scenarios from your question.
1. I'm assuming that your are passing Username as params, if that is the case then use this:
2. If you are fetching all the data from the DB and you want them to return in JSON format, then you can try this:
If you still feel like this Is not what you want then feel free to get back. I'll be happy to assist.
I hope you find the above solution helpful. If it does, please mark it as Best Answer to help others too.
Thanks and Regards,
Suraj
let us assume that our requirements
class: details
method:getdata
input:username
method shold be in JSON format array to fetch the user and opportunity information
if no records then return null
user object fields:username,email
opportinity fields: stagename,id