Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, June 18, 2025 
 
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!
 Architect Forums - SalesLogix Scripting & Customization
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.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: My New .NET Notes/History User Control is Missing Drag-and-Drop Attachments from Outlook
Christopher Morley
Posts: 21
 
My New .NET Notes/History User Control is Missing Drag-and-Drop Attachments from OutlookYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 May 07 9:19 AM
fiogf49gjkf0d
Hi All!

Related Questions:

How does Saleslogix get around the Outlook Security and extract attachments? Is there just a little setting in Outlook or the Reegistry you can tweak? Does it use MAPI? Either way, how do I get Attachments out of a MailItem or MapiObject easily? Can I call SlgxApi.dll from .NET to just do it for me, somehow?

The Story:

By "leveraging .NET" in Saleslogix, I built a User Control very similar to the Notes/History tab in Saleslogix (spending a lot of time and effort on this, I re-worked the whole thing). It takes a small fraction of the time to load as the built-in one was taking (for us), and adds some cool new features. Granted, I may have gone overboard on this and probably reinvented the wheel to some extent and buzzed right by Easyway tower at Mach 8. But I just needed to get this all in a C# context than muck around in Saleslogix Architect land, which is a little too dumbed-down for me and takes too long to do anything (and with which I am admittedly much less familiar with). So I even doppleganged the Filter Options functionality, the export to email, export to Word functions, and built my own MSI installer for it, and launched it company wide with Windows login scripts. (There is no spoon.)


My users are happy because it is fast and slightly more easy to use.


My sysadmins are happy because there is far less load on the servers and less complaints resulting from database table locks.


Last week was wonderfully comfortable for everyone but me (because I'm still primarily focused on what is wrong with it). We still have 2 Notes/History tabs - the old one and the new one. I cannot get away with blasting away the legacy Notes/History tab, yet, because of some lingering sticking points with the user base.

It looks a little different but mine looks and responds better IMO. You can simply mouse over / roll over the rows in the grid to see the Notes (short notes) data on the right instead of clicking on individual rows. Those are already preloaded as an invisible column. Click to see longnotes. You can drag to multi-select rows. Multiselected history records all export to Outlook or Word.

There's no control-level right-click menu-context. There's no up/down key functionality. There are a couple of weird, rare bugs that can cause .NET exception pop ups but they're fairly rare so far but I think a decent code review would highlight the cause of those. Plus I'm still having rare issues with the references from Saleslogix being lost and people occasionally getting blank forms.* Those are just tiny issues and of no big concern. I can clean them up later.

* by the way - I figured out a cool workaround to the issue where you can have multiple instances of the same user control in Saleslogix. At first, with the leveraging .NET examples, the new embedded .NET user control would jump around different panes and tabs as different places in Saleslogix would try to instanciate the control and realize that there already was one in Saleslogix memory and use that. There was the Middle pane, a saved tab, and the More Tabs.. preview itself. So I wrote a little code to allow at most 3 instantiations, and grab the one not being used. It has been working pretty well. Of course, Filter Options stick to their individual instantiation but that seems to make some sense.


* Here is another cool trick I figured out. When they add a history record themselves in Saleslogix, Saleslogix will call a particular event on the User Control to repaint/refresh, but does so an annoyingly "many" number of times - like 4, 5, sometimes 8 - it's weird. I just check to see if the last refresh was within a certain number of milliseconds, and if "iJustRefreshed_Dude_LeaveMeAlone" is true, it decides that it is refreshed enough. Otherwise it will refill the datagrid based on the current filter options.


The function that the built-in Saleslogix notes/history does that mine doesn't (yet) is that it:
Accepts drag-and-drop emails from Outlook, and it will even:

+break up Attachments and put them in the Attachments table and write them to the Attachments directory on the server


I want to accomplisth that same thing from within a C# .NET User Control context, however I'm not sure how to break off Attachments correctly, without going back to the days of parsing Content-Encoding, convert base64, etc. all that non-sense. I want to skip that an magically have a File object (or objects) that I can plunk down on the server and write the filepath to the Attachments table.

Does anyone know of a tool or knowledge that would accomplish this functionality, hopefully somewhat decoupled from Saleslogix's own Notes/History object?

I was running into the Outlook Security manager pop-up about another program trying to access mail, and sort of got around that because I found some good MAPI code by Helmut Obertanner which gets around it. However - it only gets the simple body of the message, which is good enough for the history note, but users are demanding that they keep their attachments too, just like it has always done. I have looked at Sue Mosher's site, MapiLabs, Outlook Spy, other add-ins to stop built-in Outlook security and/or expose the Attachments and/or provide other easy manipulations. I think I would prefer to use Saleslogix or Microsoft APIs than graft on a separate, sophisticated MAPI reader.

Again, my questions:

How does Saleslogix get around the Outlook Security and grab the attachments, anybody? Is there just a little setting in Outlook or the Reegistry you can tweak? Does it use MAPI? Either way, how do I get Attachments out of a MailItem or MapiObject easily? Can I call SlgxApi.dll from .NET to just do it for me, somehow?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: My New .NET Notes/History User Control is Missing Drag-and-Drop Attachments from OutlookYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 May 07 1:38 PM
fiogf49gjkf0d
Quote:
Originally posted by Christopher Morley

Again, my questions:

How does Saleslogix get around the Outlook Security and grab the attachments, anybody? Is there just a little setting in Outlook or the Reegistry you can tweak? Does it use MAPI? Either way, how do I get Attachments out of a MailItem or MapiObject easily? Can I call SlgxApi.dll from .NET to just do it for me, somehow?


Answer here: http://www.slxdeveloper.com/forum.aspx?forumid=2004&postid=7768
[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/18/2025 8:40:19 AM