8/18/2025 12:27:24 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 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.
|
|
|
|
Compilation error when BusinessRule returns System.Data.DataTable
Posted: 28 Apr 09 9:20 PM
|
Hi all,
I'm creating a custom external assembly (dll) that takes a ContactId and returns complex data that comes from a sql view in a DataTable. This business rule will be used within a tab to populate several text boxes with data from the DataTable.
I created a new BusinessRule with the following signature:
public static void GetComplexData(IContact contact, out System.Data.DataTable result)
The primary step is as follows:
#region Usings using System; using Sage.Entity.Interfaces; using Sage.Form.Interfaces; using System.Data; using MyAssembly; #endregion Usings
namespace Sage.BusinessRules.CodeSnippets { public static partial class ContactBusinessRules { public static void GetComplexData( IContact contact, out System.Data.DataTable result) { return MyAssembly.getComplexData(contact.Account.Id.ToString()); } } }
In the snippet header I have references to both my assembly and System.Data.
When I try to build the project, I get the following error:
IContact.cs(682,24):The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?)
If I open IContact.cs by double clicking the error, I can see that in the usings of the file System.Data is not there. Does this mean that the return type of a BusinessRule can only be a primitive type? What if I want my business rule to return complex data? Or, is there a way to add "usings" to the generated IContact interface?
My goal is to bring all the data at once, since this implies selecting from a very complex sql view (which as far as I know are not supported for entities).
Thanks |
|
|
| |
|
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!
|
|
|
|
|
|
|
|