8/16/2025 7:27:19 PM
|
|
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.
|
|
|
|
Wanted: Business rule to delete...
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(); } }
|
|
|
|
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!
|
|
|
|
|
|
|
|