Announcements
Hi there,
I have a field called legal entity in my table, in this field I want my legal entity name for every record created.
ThankYou.
Don't let end-users be technical architects; they're usually not trained in things like the design of relation databases. It's our role to do this work.
Let users define business requirements and then design a technical solution that meets both business requirements and non-functional requirements (e.g. regarding maintainablity, performance, data consistency and so on).
It seem that they believe that a field must be added to the particular table to be addable via personalization, which isn't true. It's also not true that all fields of a table can automatically be added that way. Therefore their technical design seems to be based on wrong assumptions.
Also, could you please respond to my previous reply? What the point ot adding DataAreaId by custom code instead of using rhe standard field? It seems like spending money to make the system slower and achieving nothing. But maybe there is a reason - that's why I asked.
Hi goshoom
They want to show legal entity in form but, not in the grid, they want it in the table as a field if they want to show it in the form they can add it from listed fields while clicking on insert columns in the form..
What is the point of this code? If the table isn't shared, the value is already stored by the system in DataAreaId, therefore you don't need to waste storage for another field, you don't need any code and you don't have to prevent set-based operations by overriding insert().
If the table is shared, isn't it a design flaw?
This is working but it's reflecting name but I want legal entity like ex: USMF
I got it by using this
this.LegalEntity = CompanyInfo::find().DataArea;
super();
Thank you.
Hi Martin
could you please tell me how to do it and where? at table level?
Don't duplicate the information. Join your table with CompanyInfo to get the name.
Hi Ganesh,,
You can set the legal entity name in the insert method of your table.
public void insert() { this.LegalEntityName = CompanyInfo::find().Name; super(); }
André Arnaud de Cal...
294,233
Super User 2025 Season 1
Martin Dráb
232,982
Most Valuable Professional
nmaenpaa
101,158
Moderator