08-03-2012 07:35 AM
Currently we are migrating SaleLogix Lan Customization to WEB.
As per requirement, we need to have a tab under some entity. This tab will contain an Image control and a file uploader control.
We need to select an image and onclicking Upload button, the image will be saved into the Database and visible in the Image Viewer.
We have created an custom page in dot net. Though its working in Dot Net env. but unfortunately we could not able to make it worked in SalesLogix. (Onclicking Upload button nothing happens)
One more thing how to add our custom .ashx file in SalesLogix as we need to have one in this case to display the image.
Any help will be highly appreciated.
08-03-2012 08:40 AM
Been there, done that.
I use ashx files all the time, not an issue with using them, but remember to keep them at the root of the Portal, otherwise you would need to setup whcihever folder you store them in as an Application.
That said, I used an Input item for the Upload:
<input type='file' runat='server'...>
That said, I do recall having some issues with IE that I didn't encouter with Chrome and had to change my design a couple of times.
08-17-2012 12:54 AM
Thank you very much for your response.
Can you plese guide me with some code snippets. As I am doing this for the first time SalesLogix, I am finding it difficult to get things going. Though things are working fine in Regular Visual Studio, but not in SalesLogix.
09-13-2012 09:56 AM
I've had to deal with this problem a few times, and I can tell you that this is very dificule to get working 100% from completely within SLX Web. What I mean by that is from within a SmartPart in SLX. The SLX implimentation of AJAX makes working with Viewstate a bit tricky for many controls. If you spend some time with the Attachments tab, and how the get the upload to work, you'll the they had to jump thorugh a few hoops to get it working. I've managed to mirror the code they've done in their JS code and on the attachments tab to get my own uploading working, but it still tends to be unpredictable with the attachments tab visible.
One last note, you have complete control over the size o fthe pop-up, but any other parameters that window.open allows have unpredicatble results. Specificaly, don't supply a title for the pop-up (IE really doesn't like this).
This works perfectly, and will save you many late nights. The only real drawback is that window is non-modal, so nothing is stopping the user from moving to another record (although by passing in the Id to the pop-up, this should not be a big deal).
09-13-2012 02:10 PM
Here's a quick and dirty solution. I used a tab workspace and a custom smart part to add a contact image. I created a BLOB field (Photo) in the contact table. The contact properties are updated in AA and the entity interfaces rebuilt.
Some notes: yes, AJAX is wonky. The server-side onClick event fires but the upload is no longer accessible. I tried using the Telerik uploader but it didn't play nice with other uploader on the attachments tab. Instead, I handled the upload in OnLoad and fired a __doPostBack() in onClientClick (trial and error). I used a Data URI to push the image data to the client, rather than creating a URL. There's a generic 200x200 image resource that is used if the Photo field is null. The uploader respects the ENTITIES/CONTACT/EDIT secured action.
You can add the attached to your AA project in Portal/SlxClient/Smart Parts/Contact, then add the smartpart to the tab workspace in the portal config.
04-25-2013 03:04 PM
This almost works in 8 too, but I can't figure out how to get the __doPostback to finish properly. SLX WEB gets stuck with a loading icon, if anyone has figured this out, tips would be very helpful. Thanks.