Hi,
I have following code,
$("#activities").kendoScheduler({
date: new Date("2014/5/19"),
startTime: new Date("2014/5/19 00:00 AM"),
endTime: new Date("2014/5/19 08:00 PM"),
views: [
{ type: "day", selected: true },
"week",
"month"
],
editable: false,
timezone: "Etc/UTC",
dataSource: {
batch: true,
transport: {
read: {
type: 'POST',
contentType: "text/xml",
url: "https:///xxx:8443/xxx/rest/xxxapp/api/xxxGetActivities",
processData: false,
dataType: "xml",
headers: { 'X-xxx-Token': '8430694659957936307' }
},
parameterMap: function() {
return '<?xml version="1.0" encoding="UTF-8" standalone="no"?><xxxGetActivitiesRequest xmlns="http://www.xxx.net/xxx/1.0"><RecordLimit>30</RecordLimit><RequestFields><Activities><Activity><ActivityNo/><AccountName/><AccountNumber/><ContactFullName/><ContactName/><ContactNameSequence/><ActivitySubject/><ActivityPriority/><ActivityPriorityCode/><ActivityText1/><ActivityText2/><ActivityText3/><ActivityStatus/><ActivityStatusCode/><ActionDate/><ActionTime/><ActionDateTime/><EndDate/><Location/><ActivityResolution/><ActivityResolutionCode/><ActivityType/><ActivityTypeCode/><LeadOpportunityNo/><LeadOpportunityTypeCode/><LeadOpportunityDetails/></Activity></Activities></RequestFields><Filters><ActivityStatusCode><Like>%</Like><NotLike>F</NotLike><NotLike>C</NotLike></ActivityStatusCode><ActionDate><Range><From>D-30</From><To>D+30</To></Range></ActionDate></Filters></xxxGetActivitiesRequest>'
}
},
schema: {
model: {
id: "activityNo",
fields: {
activityNo: { from: "ActivityNo", type: "number" },
title: { from: "ActivitySubject", defaultValue: "No title", validation: { required: true } },
start: { type: "date", from: "ActionDate" , format: "{0:dd-MMM-yyyy}"},
end: { type: "date", from: "EndDate", format: "{0:dd-MMM-yyyy}" },
atendees: { from: "ContactFullName", nullable: true },
startTimezone: { from: "StartTimezone",nullable: true },
endTimezone: { from: "EndTimezone",nullable: true },
description: { from: "Description",nullable: true },
recurrenceId: { from: "RecurrenceID",nullable: true },
recurrenceRule: { from: "RecurrenceRule",nullable: true },
recurrenceException: { from: "RecurrenceException",nullable: true },
roomId: { from: "RoomID", nullable: true },
isAllDay: { type: "boolean", from: "IsAllDay" , nullable: true }
}
}
}
}
});
Even though I can see the call is made to the web service and correct data is downloaded, no activities are not displayed in the scheduler as I expect. Few questions,
1. In the service I don't have all the schema models. So I have put dummy from fields with nullable true. is that correct
2. Dates are passed back from the web service in dd-MMM-yyyy format (ex: 14-May-2014). How can I map it to underlying dates in Kendo (is it automatically done?). I am not talking about visual aspects here but background mapping.
3. Is there anything else wrong in my code?
You help is highly appreciated.
Asat
I have following code,
$("#activities").kendoScheduler({
date: new Date("2014/5/19"),
startTime: new Date("2014/5/19 00:00 AM"),
endTime: new Date("2014/5/19 08:00 PM"),
views: [
{ type: "day", selected: true },
"week",
"month"
],
editable: false,
timezone: "Etc/UTC",
dataSource: {
batch: true,
transport: {
read: {
type: 'POST',
contentType: "text/xml",
url: "https:///xxx:8443/xxx/rest/xxxapp/api/xxxGetActivities",
processData: false,
dataType: "xml",
headers: { 'X-xxx-Token': '8430694659957936307' }
},
parameterMap: function() {
return '<?xml version="1.0" encoding="UTF-8" standalone="no"?><xxxGetActivitiesRequest xmlns="http://www.xxx.net/xxx/1.0"><RecordLimit>30</RecordLimit><RequestFields><Activities><Activity><ActivityNo/><AccountName/><AccountNumber/><ContactFullName/><ContactName/><ContactNameSequence/><ActivitySubject/><ActivityPriority/><ActivityPriorityCode/><ActivityText1/><ActivityText2/><ActivityText3/><ActivityStatus/><ActivityStatusCode/><ActionDate/><ActionTime/><ActionDateTime/><EndDate/><Location/><ActivityResolution/><ActivityResolutionCode/><ActivityType/><ActivityTypeCode/><LeadOpportunityNo/><LeadOpportunityTypeCode/><LeadOpportunityDetails/></Activity></Activities></RequestFields><Filters><ActivityStatusCode><Like>%</Like><NotLike>F</NotLike><NotLike>C</NotLike></ActivityStatusCode><ActionDate><Range><From>D-30</From><To>D+30</To></Range></ActionDate></Filters></xxxGetActivitiesRequest>'
}
},
schema: {
model: {
id: "activityNo",
fields: {
activityNo: { from: "ActivityNo", type: "number" },
title: { from: "ActivitySubject", defaultValue: "No title", validation: { required: true } },
start: { type: "date", from: "ActionDate" , format: "{0:dd-MMM-yyyy}"},
end: { type: "date", from: "EndDate", format: "{0:dd-MMM-yyyy}" },
atendees: { from: "ContactFullName", nullable: true },
startTimezone: { from: "StartTimezone",nullable: true },
endTimezone: { from: "EndTimezone",nullable: true },
description: { from: "Description",nullable: true },
recurrenceId: { from: "RecurrenceID",nullable: true },
recurrenceRule: { from: "RecurrenceRule",nullable: true },
recurrenceException: { from: "RecurrenceException",nullable: true },
roomId: { from: "RoomID", nullable: true },
isAllDay: { type: "boolean", from: "IsAllDay" , nullable: true }
}
}
}
}
});
Even though I can see the call is made to the web service and correct data is downloaded, no activities are not displayed in the scheduler as I expect. Few questions,
1. In the service I don't have all the schema models. So I have put dummy from fields with nullable true. is that correct
2. Dates are passed back from the web service in dd-MMM-yyyy format (ex: 14-May-2014). How can I map it to underlying dates in Kendo (is it automatically done?). I am not talking about visual aspects here but background mapping.
3. Is there anything else wrong in my code?
You help is highly appreciated.
Asat