11/22/2024 3:55:08 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss using the SalesLogix COM interfaces from external applications, such as SlxApplication, ClientObjix, etc. View the code of conduct for posting guidelines.
|
|
|
|
Accessing SalesLogix COM via PHP
Posted: 09 Sep 07 6:24 PM
|
I am wondering if anyone has had success accessing any of the Saleslogix.SLXApplication.BasicFunctions using COM in PHP on IIS. |
|
|
|
Re: Accessing SalesLogix COM via PHP
Posted: 09 Sep 07 11:21 PM
|
Originally posted by Paul Engelbrecht
I am wondering if anyone has had success accessing any of the Saleslogix.SLXApplication.BasicFunctions using COM in PHP on IIS. |
|
Yes, technically you can use SalesLogix.SlxApplication in PHP. However, there is a flaw in the idea to use it from a web application at all, regardless of technology. From a web app, using PHP, .NET, etc - the code will execute server-side. In the case of using SlxApplication, this would mean that the SLX client would be running on the server and in another user session than that of the website's process. This is a bad idea and creates way too much overhead and instability for the server-side code for a web app. The SlxApplication object cannot be used without the client running. This just won't work well for *any* web app.
A better idea would be to use the SLX OLEDB provider instead from the PHP app.
e.g:
$conn = new COM("ADODB.Connection"); $conn->Open($SlxConnectionString); $conn->Execute("update account set mainphone = '8005551212'"); $rs = $conn->Execute("select * from account where acountid = 'AXXXX0000001'"); while (!$rs->EOF) { print $rs->Fields["account"].'-'.rs$->Fields["accountid"]; $rs->MoveNext(); } $rs->Close(); $rs = null; $conn->Close(); $conn = null;
The key here is to simply use the SLX connection string for the connection. See http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=55 Then you can read and write from the SLX database, all will sync and SLX security will be applied.
Make sense? |
|
|
|
Re: Accessing SalesLogix COM via PHP
Posted: 10 Sep 07 8:28 AM
|
Thanks Ryan, Yes, that makes perfect sense. I am already accessing the SLX OLE from PHP in other areas of the web app. The dilema I face now is similar to some other posts I've read in this section and it has to do with Groups.
Basically, I need my web app to grab the underlying SQL statement from the DATA field in the PLUGIN table for a specified group. The web app can identify the row easily enough, decoding the datablob is where I get stuck.
Any suggestions? |
|
|
|
Re: Accessing SalesLogix COM via PHP
Posted: 10 Sep 07 11:07 AM
|
Ryan,
Is there any language you don't know?
I have a hard enough time getting my head around .NET, much less PHP.
Jeff
|
|
|
|
Re: Accessing SalesLogix COM via PHP
Posted: 10 Sep 07 11:16 AM
|
Originally posted by Jeff Ballard
Ryan,
Is there any language you don't know?
I have a hard enough time getting my head around .NET, much less PHP.
Jeff
|
|
I really don't do that much PHP. I don't like it that much either. I am a die-hard .NET fan and stay strictly C# as much as possible. However, I do projects in some cases in other languages if that is a requirement of my customer. I've delivered projects in many different languages, but I don't really care to do anything but C#. I don't know PHP like I know .NET. I only know enough PHP to get by, if I have to. |
|
|
|
Re: Accessing SalesLogix COM via PHP
Posted: 10 Sep 07 11:34 AM
|
Just an idea, maybe you could build something into the client to cache out the group SQL. On the close or open of the client, run through the groups and save out the group SQL to some table. Then you could just use that from the web app? Just an idea... |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|