Hello Everyone,
I looking to add an additional parameter onto my Request Payload when my Post "CreateM5Data" is called. I tried params, extraParams, encode : true, but nothing give me the desired result. Using extraParams without the encode puts the param onto the end of the query string url, which is a get. Turning on encode with extra params remove my request payload and puts only the extraParameter.
Code:
var eventStore = Ext.create('Extensible.calendar.data.EventStore', {
proxy: {
type: 'ajax',
actionMethods: {create: "POST", read: "POST", update: "POST", destroy: "POST"},
api:{
read:'http://'+window.location.host+'/MunicityWcf/M5Service.svc/GetM5Data?customer=Scarsdale&module=§ion=&entity=SenchaAppointment&entity_id=&mapobject=&mapid=&pid=&searchfield=Contact_ID&fieldtype=numeric&operator==&value=23014&numrecs=900',
create : 'http://'+window.location.host+'/MunicityWcf/M5Service.svc/CreateM5Data',
update : 'http://'+window.location.host+'/MunicityWcf/M5Service.svc/UpdateM5Data',
destroy : 'http://'+window.location.host+'/MunicityWcf/M5Service.svc/DeleteM5Data'
},
extraParams:{customer:"Scarsdale"},
noCache: false,
reader: {
type: 'json',
root: 'rows'
}, writer: {
type: 'json',
//encode : true,
//writeAllFields : true,
nameProperty: 'mapping'
}}
});
This is what my request payload looks like :
Code:
{"Appointment_ID":"","Contact_ID":"77","Appointment_Subject":"sfasdfasf","Appointment_StartDate":"2013-02-06T00:00:00-05:00","Appointment_EndDate":"2013-02-06T01:00:00-05:00","Appointment_Recurrence":"","Appointment_Location":"","Appointment_MessageBody":"","Appointment_URL":"","all_day":false,"reminder":"","entity":"","ContactAppointmentMap_ID":"","mapentity":""}
and this is what i need it to look like:
Code:
{"Appointment_ID":"","Contact_ID":"77","Appointment_Subject":"sfasdfasf","Appointment_StartDate":"2013-02-06T00:00:00-05:00","Appointment_EndDate":"2013-02-06T01:00:00-05:00","Appointment_Recurrence":"","Appointment_Location":"","Appointment_MessageBody":"","Appointment_URL":"","all_day":false,"reminder":"","entity":"","ContactAppointmentMap_ID":"","mapentity":","customer":"Scarsdale",}
The only difference is the key value pair of "customer":"Scarsdale" at the end.
Thank you for any help,
Marcus