How to include Custom Object in Ask.php?

Tags: 

Hi All,

I am doing some R&D on how to include Custom Object fields in Ask.php file and I am following the example of SiteInfoCustomObject widget

http://documentation.custhelp.com/euf/assets/docs/may2015/cp_resources/s...

I have imported the Custom Object and copied the relevant controllers, models, widget. But when I click on Submit after filling the details, I receive the following error

"This end point requires that the body of all requests be formatted as JSON. The request was not correctly formatted."

Any suggestions on how to troubleshoot the issue

Thanks
Suresh

Comments

Without more details, I can't help with specifics, but when debugging something like this I'd recommend using your browser's network debugging tools or fiddler to inspect the request/response data and ensure the data is being generated, transmitted and parsed correctly on both ends.

Hi

Ben - I have resolved the issue myself by putting ajax controller in action attribute of form tag instead of extending FormSubmit widget and routing.....

Thanks
Suresh

Ben,

I tried to develop similar widget, but I don't catch dependencies between files in the SiteInfoCustomObject, however I studied the manual. I'm trying to build list of values based on custom object values. List should display name and return id to custom field. I was able to display values from custom object but selected value is not saved on incident.

Is there a documentation or simple example of widget where dependencies between files are more obvious or better explained?

Thank you in advance,
Michal

Zircon - This is a contributing Drupal Theme
Design by WeebPal.