Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Download Person data (expanded)
- this.getModel().read("/Persons('S0017572006')", {
- urlParameters: {
- $expand: "GenerationDetails,GradeDetails,ProfessionDetails,ReceivedNotifications,SendedNotifications,Reports,Reports/SchoolTexts,Reports/DailyTexts,Reports/WorkTexts,Reports/DepartmentDetails"
- },
- success: function(data, response) {
- var content = response.body;
- var filename = "export.json";
- var contentType = "application/json";
- if (!contentType) contentType = 'application/octet-stream';
- var a = document.createElement('a');
- var blob = new Blob([content], {
- 'type': contentType
- });
- a.href = window.URL.createObjectURL(blob);
- a.download = filename;
- a.click();
- }
- });
Add Comment
Please, Sign In to add comment