Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Copper Elite Contributor
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

Bronze Super Contributor
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
Gold Super Contributor
Posts: 3,087
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 +1 603.369.3047 x101

".. Innovators in Mobility - Experts in Workflow Automation..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
Highlighted
Moderator
Posts: 440
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, Infor CRM Development

Infor CRM

Infor CRM

Copper Elite Contributor
Posts: 39
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.