6/18/2025 9:28:16 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 writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
| |
|
Re: Yet Another datagrid question
Posted: 30 Apr 07 12:00 PM
|
fiogf49gjkf0d There are 2 paradigms with the datagrid, multi-select or not. 1) Multi-select: False - GetCurrentField("") returns the primary key. You may need something extra when using a fieldname in GetCurrentField, as I've always just dealt with the primary key and underlying recordset. 2) Multi-select: True - .Selected.* returns the values you want. MAJOR CAVEAT: You MUST have the primary key as a column in the datagrid. You can make it invisible but it has to be there. ALSO: You may have to set sortable to true. This loads the ENTIRE RECORDSET into memory so if you have a datagrid returning all 5k account records in your database, it's going to be S...L...O...W.
It's kind of a shame that this isn't officially documented anywhere but it's something one has to "stumble" upon. Good thing you tripped on this site, eh? |
|
|
|
Re: Yet Another datagrid question
Posted: 30 Apr 07 12:27 PM
|
fiogf49gjkf0d A few ideas. Make sure your datagrid has a basetable and keyfield. Also, the method of using the Selection collection only works if you manually add the ID field to the grid layout (you can then make it not visible, but it does have to be there). |
|
|
| |
| |
|
Re: Yet Another datagrid question
Posted: 30 Apr 07 1:27 PM
|
fiogf49gjkf0d Crap ... was trying to edit my last post , and created another. Arg .. someone please delete the first one? Thanx |
|
|
|
Re: Yet Another datagrid question
Posted: 30 Apr 07 1:40 PM
|
fiogf49gjkf0d There's no way to segregate the attachment directory like you want. The major problem is remotes but the other is the fact that the branchoptions table holds the paths and it only allows a single row.
Now, having said that if you do not have remotes could you hack something together? Most likely. Attachments main purpose is to synchronize those files, thus the need to store the branchoptions record along with some other bits of data. Could you have an attachment table and a manual process that segregates everything accordingly? In theory I believe so but you aren't going to be playing nice with the existing attachments structure. No using Application.BasicFunctions.InsertFileAttachment or any of the other functions, you'll have to roll your own (which is as trivial as adding a record to the attachment table and copying a file to the adequate directory).
Another method I just thought of would be to have an attachment "helper" class that sits on top of the standard attachments. When a user requests attachment X, instead of it being opened in UNC, your helper copies this file to a local directory (My Documents\SalesLogix?) and then opens THAT file. Save As stores to that location or My Documents. The only and major issue with this is you'll have a hard time detecting when the document was updated in Word so that you copied the file back to the "main" attachment directory. One method SalesLogix used in the past was a modal dialog box that said "Are you finished editing?" then when you clicked Yes it would reimport the document. This was how Mail Merge templates were handled (completely inside Word) before SLX created their template manager that is basically a wrapper around Word. |
|
|
|
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!
|
|
|
|
|
|
|
|