Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Copper Contributor
Posts: 10
Registered: ‎08-12-2011

How to pull data for a custom widget

I'm looking into how to write new widgets. I'd like to find out if anyone knows where to find documentation on how to pull data from the database, or has any information on how this is done.


I looked at the Today's Activities widget. It has code to pull in Activities based on the current user's ID. This comes in the html section with code like:


   var _currentUserId = Sage.Utility.getClientContextByKey('userID') || '';

   _currentUserId = _currentUserId.trim();


This gets me the user ID, which I need to access my table. This has information in a custom table indexed by Userid.


I'm particularly looking for information on these methods:


  • Sage.Data.SDataServiceRegistry.getSDataService
  • Sage.Data.BaseSDataStore

I looked at the SData web page, but everything there is related to HTML GET/PUT. I don't see anything on what these calls do, and I imagine they are part of some library that's used in JavaScript.


I haven't started testing yet, and if I can get some information about how these work before I do that, I think it would save a lot of time.