Need a json response from an externally callable object function — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Need a json response from an externally callable object function

I have set the visibility of an object function to 'Callable By External Systems' and return type as String (as Object, List, Map is not supported).
Inside the object function I need to return a json object to the source where it is being called.

Currently I am returning a map as shown below

def response = [      status : "error",      message: e.message    ]

return response

At the source, I am getting a response like this,

{    "result": "{status=error, message=api failed}"}

I have been tryign an alternative to return an exact json object or string to the source.

Requirement : Need to return a json response to source from Fusion CRM application containing some records data that we want to send.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!