Sage SalesLogix
  • Contact Us
  • Sage North America
800-643-6400
Welcome Twitter Facebook LinkedIn
Community Home Blogs Share Ideas Search Request Access Resources
Reply
Copper Elite Contributor
henrycohen29
Posts: 70
Registered: 04-30-2009

SLX Web 7.5.1 - SData

Hi,

 

Is there a way to query the DB using javascript? Is there an API I can use, and how does SData fit into all of this? 

 

Thanks

~ Henry

Please use plain text.
Bronze Super Contributor
garnold
Posts: 204
Registered: 03-10-2009

Re: SLX Web 7.5.1 - SData

You have 2 options...

 

Mashup's

and

NamedQueries

 

Here is a link to a named query example. This requires server side code to build the query and clientside code to call the query via javascript. I use this all the time so I can move the database query part of my controls over to the client.

 

http://sites.google.com/site/genesprojects/code/namesqueryclientside


Sr. Sales Engineer
Gene Arnold
Please use plain text.
Gold Super Contributor
RJLedger
Posts: 2,234
Registered: 03-19-2009

Re: SLX Web 7.5.1 - sData

The sData "protocol" is simply RESTful web services based. You can form the URI strings yourself but will have to deal with the returning "payload" (in atom xml or JSON).

 

With the release of SP2 (in beta) there have been changes in sData (in the request as well as payload). SP2 will have a set of .NET libraries for use by apps to isolate you from potential future changes.

 

FYI: Consider sData in SP1 as a prelim... (ex: .9 release) and sData in SP2 as 1.0. I suggest you take a look at the SP2 beta forum for additional info. 

--
RJ Ledger - rjledger@rjlSystems.net

".. Stay Focused..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
Please use plain text.
Moderator
jperona
Posts: 232
Registered: 05-07-2008

Re: SLX Web 7.5.1 - SData

Both solutions suggested are correct.  Depending on where you want to access the data.  If you are accessing from an external website I'd look at our SData API.  If you are internal to the Client I would follow Gene's advice.

John Perona

Director, SalesLogix Engineering

Sage SalesLogix

Sage

Please use plain text.
Copper Elite Contributor
GCS
Posts: 35
Registered: 07-13-2010

Re: SLX Web 7.5.1 - SData

[ Edited ]

I try to use a named query, using Gene's code as an example.

What I do not understand in the example: Where is the definition of the query? I see a query Oppo28Target is executed, but where is it defined?

I see the server side code example - but I like to execute the query in a client script. At which time do I have to write the serverside script?

Thanks for your help.

Please use plain text.