Guest User

Untitled

a guest
Jan 22nd, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. // Download Person data (expanded)
  2. this.getModel().read("/Persons('S0017572006')", {
  3. urlParameters: {
  4. $expand: "GenerationDetails,GradeDetails,ProfessionDetails,ReceivedNotifications,SendedNotifications,Reports,Reports/SchoolTexts,Reports/DailyTexts,Reports/WorkTexts,Reports/DepartmentDetails"
  5. },
  6. success: function(data, response) {
  7. var content = response.body;
  8. var filename = "export.json";
  9. var contentType = "application/json";
  10. if (!contentType) contentType = 'application/octet-stream';
  11. var a = document.createElement('a');
  12. var blob = new Blob([content], {
  13. 'type': contentType
  14. });
  15. a.href = window.URL.createObjectURL(blob);
  16. a.download = filename;
  17. a.click();
  18. }
  19. });
Add Comment
Please, Sign In to add comment