Posted By

garnold on 04/27/11


Tagged

mobile SalesLogix


Versions (?)

SLX Mobile


 / Published in: JavaScript
 

This is just a collection of items that will need to be sorted out later into separate snippets.

  1. /**
  2.  * argos-sample project.
  3.  * User: jhershauer
  4.  * Date: 4/9/11
  5.  * Time: 11:02 PM
  6.  */
  7. Ext.namespace('Mobile.Sample');
  8. Mobile.Sample.ApplicationModule = Ext.extend(Sage.Platform.Mobile.ApplicationModule, {
  9. //localization strings
  10. regionText: 'region',
  11. faxText: 'fax num',
  12.  
  13. loadViews: function() {
  14. Mobile.Sample.ApplicationModule.superclass.loadViews.apply(this, arguments);
  15. },
  16.  
  17. loadCustomizations: function() {
  18. Mobile.Sample.ApplicationModule.superclass.loadCustomizations.apply(this, arguments);
  19. this.registerAccountCustomizations();
  20.  
  21. },
  22. registerAccountCustomizations: function() {
  23.  
  24. //Add Region to the SData query for the Account Detail view
  25. var detailView = Mobile.SalesLogix.Account.Detail;
  26. Ext.override(detailView, {
  27. querySelect: detailView.prototype.querySelect.concat([
  28. 'Region'
  29. ])
  30. });
  31.  
  32. //Add Region to the Account Detail view, right above the Type property
  33. this.registerCustomization('detail', 'account_detail', {
  34. at: function(row) { return row.name == 'Type'; },
  35. type: 'insert',
  36. where: 'before',
  37. value: {
  38. name: 'Region',
  39. label: this.regionText
  40. }
  41. });
  42.  
  43. //Change label for fax on Account Detail view
  44. this.registerCustomization('detail', 'account_detail', {
  45. at: function(row) { return row.name == 'Fax'; },
  46. type: 'modify',
  47. value: {
  48. label: this.faxText
  49. }
  50. });
  51.  
  52. //Hide the Lead Source
  53. this.registerCustomization('detail', 'account_detail', {
  54. at: function(row) { return row.name == 'LeadSource.Description'; },
  55. type: 'remove'
  56. });
  57.  
  58. //Clear out the toolbar on the right-hand side of the Account Detail view.
  59. Ext.override(Mobile.SalesLogix.Account.Detail, {
  60. init: function() {
  61. Mobile.SalesLogix.Account.Detail.superclass.init.apply(this, arguments);
  62. this.tools.tbar = [];
  63. }
  64. });
  65.  
  66. }
  67. });

Report this snippet  

You need to login to post a comment.