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!
|
|
Beginner coding help
Posted: 21 May 08 8:22 AM
|
I have been modifying some scripts in Architect and would like to know if someone can point me in a direction for documentation. For example, I have seen some coding that uses GetFields. This is all new to me and I have been learning a lot, but somethings I just can't seem to find anything that explains some of these methods. My background is actually in AS/400 RPG programming and I am now taking over the Saleslogix development. Any help would be greatly appreciated! Thanks, Renee |
|
|
|
Re: Beginner coding help
Posted: 21 May 08 9:51 AM
|
If you click the "Include Script" button at the top of the window, a pane will open up listing all the included scripts. You can open those scripts and see what functions are available from each script, and double-click them to open up the function itself.
That's how I figured out how to use a lot of the undocumented methods that SLX uses. |
|
|
|
Re: Beginner coding help
Posted: 21 May 08 6:23 PM
|
You can get help on VBScript here http://msdn.microsoft.com/en-us/library/d1wf56tt.aspx
If you see a function or command in the SLX code that is not documented there, it has been defined somewhere within SLX - either within the module you are in or within one of its INCLUDEd scripts. For anything that is defined within SLX, the source code is there for you to analyse. You will often have to do this to work out what is going on. You may then scratch your head and think: "Why the hell did they do it like that?" but that's another story.
You will also see a lot of calls to the 'application' object. This is a special object exposed within SLX providing various useful properties and methods, which are documented.
It's a whole different world from RPG, that's for sure.
Phil |
|
|
|
Re: Beginner coding help
Posted: 22 May 08 1:09 AM
|
GetField ("TABLE","COLUMN","WHERE") e.g strType = GetField("TYPE","ACCOUNT","ACCOUNTID='" & myID & "'")
This is, essentially, a brilliant way to return one column without going to the effort of writing the OLEDB stuff to open the table, read the col for that ID and return it, close etc.
GetFields is exactly the same - except it returns more than one column into an array.
Both of these are in SLX Database Support and if you open that - you'll see these functions and how they work. |
|
|
|
Re: Beginner coding help
Posted: 22 May 08 1:10 AM
|
Also, get a copy of DevRef for 7.2 - this shows you the common functions/methods etc. (doesn't cover this one actually! - as they are SLX Includes). |
|
|
|
Re: Beginner coding help
Posted: 22 May 08 7:16 AM
|
Thanks for all of your help. It has been a big adjustment after coding in RPG for 20 years to have to switch to something like this. Can you please tell me where I can find a copy of the DevRef for 7.2. We are currently using version 6.2.6.1007. Will that make a difference? Thanks again, Renee |
|
|
|
Re: Beginner coding help
Posted: 22 May 08 7:35 AM
|
Yes, can imagine it's a bit of a change !! Your BP will have access to the DevRef and you will need the version for 6.2 (there's one for each version). |
|
|
|
Re: Beginner coding help
Posted: 22 May 08 9:49 AM
|
A completely excellent resource for you that I would also recommend (besides this site ) is the DevLogix books (See http://www.cafepress.com/devlogixshop/904300). There are two that would be great for you, the DevLogix III.7 book and also the companion book on the Application object (but if you're only going to buy one get the DevLogix III.7 book). These are excellent books, especially for someone just getting started with SLX.
-Ryan |
|
|
|
Re: Beginner coding help
Posted: 23 May 08 6:39 AM
|
Originally posted by Renee Bender
Thanks for all of your help. It has been a big adjustment after coding in RPG for 20 years to have to switch to something like this. Can you please tell me where I can find a copy of the DevRef for 7.2. We are currently using version 6.2.6.1007. Will that make a difference? Thanks again, Renee |
|
Log into the SalesLogix support site... Support.SalesLogix.com .. and you can download it there.
Of course I presume you are current on Maintenance and Support.
FYI - v6.2.x will be retired in Feb 2009 (9 months away). You need to seriously start thinking about an upgrade to v7.2.2.
-- RJLedger - rjlSystems "...Customer First..." |
|
|
|