7/5/2025 2:29:27 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.
|
|
|
|
Setting Seccodeid(Owner) on data-bound custom Entities
Posted: 26 Aug 09 1:19 PM
|
I have an interesting problem that I think should have a fairly simple answer. We have a highly customizes vertical on the SLX platform that has 20 (or so) custom tables. These tables all need to adhere to field level security, so Seccodeid was added to all of these tables.
In the LAN client, the Provider handles at least the initial setting of this value; however, the WEB client does not. When saving data via a data-bound control on a form, the Web client will create a record, but throws an error when it tries to save the data. If you look at the record in SQL, the Seccodeid value is not set, and setting this value fixes the issue.
I've tried playing with the Join types, but this did not seem to make any difference. I'm sure I can add some code to the OnCreate or OnAfterInsert event (or possibly a trigger on the tables), but I'm hoping there may be a simpler way to handle this.
So, is the Web client supposed to default this value? If so, what might be preventing this from happening? If not, what is the most effective way to manage this issue. I'm sure we aren't the only Partner that has custom tables with seccodeid 
Thanks! |
|
|
|
Re: Setting Seccodeid(Owner) on data-bound custom Entities
Posted: 26 Aug 09 5:10 PM
|
I think you have to write some code for Web. If not, I hope someone pipes up to correct me.
To handle this we added the following to the OnBeforeInsert event for the custom table (AccountService in this case):
public static void OnBeforeInsertStep( IAccountService accountservice, ISession session) { accountservice.Owner = accountservice.Account.Owner; }
and the following to the Account ChangeAccountOwner business rule as a Post Execute Step:
public static void ChangeAccountOwnerStep( IAccount account) { if (account != null) { foreach (IAccountService accsvc in account.AccountServices) { accsvc.Owner = account.Owner; } } }
|
|
|
| |
|
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!
|
|
|
|
|
|
|
|