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: Wanted: Business rule to delete...
Byrnes
Posts: 43
 
Wanted: Business rule to delete...Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Dec 08 2:34 PM
I wrote a business rule to return the ID of an asset/product against a Contract. (I then delete this object by referencing the ID that's returned when I call the business rule.

I'd like to take it a step further and I'm still too clumsy to figure this out.

I'd like to create a business rule called: DeleteAllAssets

I'd like this to then delete everything without having to return or mess with IDs of records - my problem is that I am not properly enumerating through contract.Items.

So, what would deleting all Items in a Contract entity business rule look like?

I've tried a few different variations, all giving me different errors. My current (failing) code looks like this:
==========================
public static void DeleteAllAssetsStep1( Sage.Entity.Interfaces.IContract contract)
{
// TODO: Complete business rule implementation
int iCount = contract.Items.Count;
Sage.Entity.Interfaces.IContractItem ci = null;
for (int i=0; i {
ci = contract.Items.GetEnumerator().Current as Sage.Entity.Interfaces.IContractItem;
ci.Delete();
}
}
[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:43 PM