Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, August 16, 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!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Adding a reference to a custom assembly (DLL) - How?
Alec Denholm
Posts: 23
 
Adding a reference to a custom assembly (DLL) - How?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Nov 08 8:36 AM
Hi guys,

I've written a string manipulation function in Visual Studio, to format Contact phone numbers. I've compiled the function into a DLL. My intention is that this function would be called in the OnBeforeUpdate event of the Contact entity. My problem is I have no idea how to reference my DLL inside AppArchitect so that I can call it from within the OnBeforeUpdate event!

The function signature currently looks something like this:
public static int FormatNumber(Country country, string numberToFormat, out string countryCode, out string areaCode, out string mainNumber, out string extension)

Note that Country is a custom entity object. The function returns an int, which indicates success/error status. The out parameters are to be used to retrospectively update the Contact's phone number with the formatted version of whatever was entered prior to the Save event.

Can anyone tell me how I can call my function from within a Contact Event?
Thanks for reading and for any help you can offer!

- Alec D
[Reply][Quote]
Andy Norris
Posts: 39
 
Re: Adding a reference to a custom assembly (DLL) - How?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Dec 08 10:33 AM
First you need to add the DLL to your portal's SupportFiles/bin directory. After that, you can open up the Contact entity in AppArchitect, navigate to the events and open the OnBeforeUpdate. There probably is already a primary step defined that you don't want to modify, so I would probably put it in the Pre-Execute Steps. Select that tab and click on Add. Choose the External Assembly radio button, then click "Choose type and method from assembly." When the Class Browser opens, select File menu and open your DLL. Expand the namespace down to your function, highlight it and click OK.

That should be all you need. Frankly though, I would probably do the formatting in a business rule instead of an event. You might find that you'll have other fields in the future that you wish to validate, and doing so in a business rule or a C# snippet may turn out to be more easily maintainable.
[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): 8/16/2025 7:54:50 PM