7/5/2025 5:31:24 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.
|
|
|
|
CanDelete Business Rule 7.5 web client
Posted: 12 Dec 08 10:20 AM
|
Howdy, I hope you can help this newbie out. I am trying to duplicate the business rule allowing only certain users to delete the record using the sage 7.2 learning video as an example. I think I have duplicated the steps exactly but I am getting a build error. I have attached the error and the complete code snipet. Thanks much in advance. \\ERROR - C:\Documents and Settings\aadmin\Application Data\Sage\Platform\Output\Sage.SnippetLibrary.CSharp\src\Sage.SnippetLibrary.CSharp.@.62980b3c-40bd-4ec5-8be5-18185b90cc19.codesnippet.cs(36,23):The type or namespace name 'Security' does not exist in the namespace 'Sage.SalesLogix' (are you missing an assembly reference?) ERROR - C:\Documents and Settings\aadmin\Application Data\Sage\Platform\Output\Sage.SnippetLibrary.CSharp\src\Sage.SnippetLibrary.CSharp.@.62980b3c-40bd-4ec5-8be5-18185b90cc19.codesnippet.cs(44,28):Type 'Sage.BusinessRules.CodeSnippets.AccountBusinessRules' already defines a member called 'CanDeleteStep1' with the same parameter types /* * This metadata is used by the Sage platform. Do not remove.
Sage.SnippetLibrary.CSharp CanDeleteStep1 Sage.Entity.Interfaces.dll %BASEBUILDPATH%\interfaces\bin\Sage.Entity.Interfaces.dll Sage.Form.Interfaces.dll %BASEBUILDPATH%\formInterfaces\bin\Sage.Form.Interfaces.dll Sage.Platform.dll %BASEBUILDPATH%\assemblies\Sage.Platform.dll Sage.SalesLogix.dll %BASEBUILDPATH%\assemblies\Sage.SalesLogix.dll Sage.SalesLogix.Security.dll %BASEBUILDPATH%\assemblies\Sage.SalesLogix.Security.dll
*/
#region Usings using System; using Sage.Entity.Interfaces; using Sage.Form.Interfaces; using Sage.SalesLogix.Security; using Sage.Platform; #endregion Usings
namespace Sage.BusinessRules.CodeSnippets { public static partial class AccountBusinessRules { public static void CanDeleteStep1( IAccount account, out Boolean result) { Sage.Platform.Security.IUserService userService= Sage.Platform.Application.ApplicationContext.Current.Services.Get; String un = userService.UserName; result = Sage.SaleLogix.Security.User.IsUserInRole(un, "CanDelete"); // TODO: Complete business rule implementation } } }
|
|
|
|
Re: CanDelete Business Rule 7.5 web client
Posted: 16 Dec 08 5:45 PM
|
Hello With help from SAGE, we found the issue. Besides a few typo's above, there is a small defect in 7.5 that when you delete a business rule, the code snippet can sometimes stay in the VFS. I did an export of the standard VFS, and was able to remove the rouge code. I am now doing things correctly working in my own test workspace.
mark
|
|
|
|
Re: CanDelete Business Rule 7.5 web client
Posted: 25 Jun 09 9:58 AM
|
Hi Mark,
As regards the "already defines a member called ... with the same parameter types", please ensure you delete the CodeSnippet file which may store this code. This file should be at: *[VFS DIRECTORY]*\Model\Entity Model\SalesLogix Application Entities\*[ENTITY ON WHICH THE CODE SNIPPET IS BASED ON]*\ Note the file you're looking for it could be inside the "QuickForms" subfolder.
Hope it helps. C-ya! |
|
|
|
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!
|
|
|
|
|
|
|
|