03-22-2013 05:52 AM
I am new in SLX development (I followed the class and begin some basic developements).
I have a problem for creating an entity using the address entity. I just have a Plant entity which has an addressid and a relation with an address.:M, save update .
What is the best way to have the address created and saved with my entity ?
I tried to create an empty address entity but for this I need the ID for my entity which is not yet existing beceause not persited...
So can someone can tell me how and where to do this please ?
Thank you very much for helping me !!
03-25-2013 07:41 AM
Can someone explain me how to generate a business rule for saving and entity linked to the Address entity please (and in which event to handle this ?
My entity looks like : PlantID, PlantName ,...., Plant.Address.ID, Plant.Address.Addresse1 .....
When I save my entity the address fields are not saved as the addressID is not filled and no address enttiy created.
So how to save them ?
03-29-2013 02:05 AM
Hi ! I would really really appreciate some advices or link on this topic because I was not able to find any solutions (the same problem yes but not the solution) and I really need to have this working.
Thanks in advance for any help !!
04-05-2013 05:23 AM
Hi, thanks for the reply.
I created using App architect m, relationship is GuardianPlant 1 M Address .
I have already created some other entities with relationnship with no problem but in that case I have to create two new entities (generaly for my other enties I use a lookup so I have no problem becaue the other entity is already existing).
With the address I need to have the entityID of AddresseID field to be able to save my addresse , BUT this ID will be generated only when my entity will be persisted... So I am not able to have it before and save my address at the same time !
So I probably need to use on after insert method to get back my entityID and be able to save my AddresseID but mya first test was not successful so I wanted to know how the creation of a new addresse ID is working,
thanls again !
04-05-2013 05:39 AM
If I understand you correctly - yes, I think you'll want to try tacking it on via an external assembly onAfterInsert; you should be able to get a reference to the entity after and grab the ID.