API v4.1 invalid session issue when creating a new record on a custom module

Hello,

I have the following situation.

I am logging in, using:

When i am trying to create a new record on Notes module i get this:

so the note is created and everything is ok.
If i am trying to create a new record on a custom module called Task LOS (cmp_ext_task_los) i get either 500 or invalid session.

Don’t ask me why i have the same cookie three times in the header…

The surprise is that in SCRM the record is created even if i got one of the error messages above.

I checked but i do not have any errors in the suitecrm log
Do you have any idea why and how to solve it?

Best regards,

Mihai

1 Like

I can see right away your name value list should be enclosed in [ ] and not {} see my blog article posted above by @rsp . I was stumped on this particular issue as well when I was doing it.

{“session”:“8439gngd65mmhq8795elkpbf89”,“module_name”:“cmp_ext_task_los”,“name_value_list”:[{“name”:“name”,“value”:“Response Test Task”},{“name”:“description”,“value”:“This is a test task”},{“name”:“task_type_c”,“value”:“analysis”},{“name”:“task_status_c”,“value”:“analysis_in_progress”}]}

i think the syntax is correct though.

That looks better, see my blog article and vidoe all the steps and code are there.

1 Like