Page edit for entity with another associated entity (Company and its address)

0
I have 2 Entities as the following : Address Line 1 Line 2 City Country Company Name PhoneNumber The company has an Address, so the relation between Company and Address is 1-1 , the company has address, address is just for 1 company, I created new page need to modify the compnay information and its address, I tried to make mpage and simply i get the fields of address as read only, can I make them editable? Page Design How it rendered : I'm new to MX sorry if it sound nooby question.
asked
5 answers
5

I think the problem is that you used the standard new button instead of a custom one. Because in that situation you have a new company but not a new address and hence you can not edit it. Instead of the standard new button create a custom one where you create a new company object and a new address object. Make sure that you set the reference in this microflow and as a last action show the new/edit page of company.

Regards,

Ronald

answered
2

If you are sure both entities are created correctly, check if the access rules are set correct for the role of the user you are testing with. Also there is a setting on the dataview of the address where you can set the editable state.

I hope this helps.

answered
0

Presumably there is a reason to have a separate Address entity, like it is used in other places as well as company. One way to approach this is to make your Company entity a specialization of the Address entity - that way all the address fields are part of the Company record, but you can also use address by itself without the company associated with it.

To do this, open the Company entity in the Modeler and choose the Address entity as Generalization on the properties.

answered
0

What Ronald says, but you could approach this using an ON CREATE MF related to the New-action for Company.

answered
0

Here is a sample application you can download (created in 6.2.0) which shows how this works with a custom New button instead of the standard one

App.zip download

answered