In SalesLogix 8 Gold, the OOB business rule for "Account.OnbeforeDelete" fails for accounts that have "GlobalSyncId" set and are not related to an Operating Company.
DLL: Sage.SalesLogix.BusinessRules.dll
Method: Sage.SalesLogix.Account.Rules.OnBeforeUpdate
The buggy code is the following:
if (account.GlobalSyncId.get_HasValue()) { throw new ValidationException(string.Format(Sage.SalesLogix.BusinessRules.Properties.Resources.Error_Deleting_IntegratedAccount, account.get_AccountName(), account.OperatingCompany.get_Name())); }
Note that "account.OperatingCompany" is referenced without checking if it's null or not. That was causing a "object reference not set to an instance of an object" exception when trying to delete some accounts from the Account Details page.
To get the accounts that fail, you may use the following SQL query:
select ACCOUNT, ACCOUNTID, GLOBALSYNCID from ACCOUNT where PRIMARYOPERATINGCOMPID is null and GLOBALSYNCID is not null
Regards,
Marcos
select ACCOUNT, ACCOUNTID, GLOBALSYNCID
from ACCOUNT
where PRIMARYOPERATINGCOMPID is null
and GLOBALSYNCID is not null
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We want to hear your cool ideas for enhancing Saleslogix products and services. So add your own ideas or kudo (vote) on the ideas of others here! Watch the most valuable bubble to the top!
I have an idea! How do I get started?
One