When you add a new one-to-one table off an existing entity that contains field level security SalesLogix will automatically add a SECCODEID field into the new table.
Notice the checkbox checked for “Enable Field Level Security” when creating the new table. This checkbox must be set when first creating the table. Once created this option can not be changed. See this post about how to manually change this.
Again, above we see the default fields added to our new table. Since we enabled field level security we see the SECCODEID field. The field level security is handled by having this field populated with the SECCODEID that “owns” the record. This owner is then used to determine the field level security for the current user. it is important to note that the field level security is not based soley on the parent table’s SECCODEID but actually based on the SECCODEID contained in the child table.
In the LAN client this was a problem in that you were responsible for making sure the child table’s SECCODEID gets set; and if the parent SECCODEID changed you also needed to change the child table values.
Now in the SalesLogix web, with the entity model, SalesLogix will automatically handle populating and updating this field. Lets take a look at how this is done:
We can see above our new table as defined in the entity model. All of the attributes of the table were automatically added to the entity model when I created the entity. The only thing I have done is to define that my entity is an extension of the account entity.
You will notice the SeccodeId property was automatically added but is not included in the entity model. Lets take a look at the other attributes of the new entity in the Project Explorer:
You will notice that another thing was automatically added to the entity when it was added to the entity model. A parent relationship to the Owner entity. Now this attribute is automatically added based upon the table having the SECCODEID field when the entity was first created. This parent relationship is what allows the entity model to automatically populate and update the SECCODEID field in the child table.
It is important to note that you can not manually add this relationship later. If you have manually added field level security to a table after you added the table, as outlined in my post above and have already added the entity to the entity model, you can not simply update the entity with the new SeccodeId property and add the relationship. You will need to remove the entity and re-add it again. Be aware that in doing this you would lose any rules, relationships, forms, etc. under the entity.