02-12-2012 09:31 PM
I know that I need to call the template to get the object graph ..
/slx/dynamic/-/accounts/$template
I know that you are supposed to then modify the field s and then send it back through a post, my question is, what exactly is the expected payload? Everything between the <sdataayload> tags?
02-16-2012 02:44 PM
Good question.
I started out this way too. I would download the template, edit all the fields, and then send it back.
I have switched to just building the payload myself for the most part now though.
The template will contain all the required fields of the entity with defaults as well as any common fields for that entity. There is a hierarchy of some sort that determines this. That is useful, but you want to clear out any fields you do not want to update/insert anyway.
You can check out some code here of inserting a ticket if you like:
https://github.com/jasonhuber/JavaScriptSData-Sample-Bootcamp/blob/master/default.htm
about line 207
But really you should come to class:
02-16-2012 02:48 PM
02-23-2012 11:59 AM
Just remember if you craft your own payload, that if the entity changes, you will need to modify your code.
02-23-2012 12:01 PM