javalava6985
Use ID on newly created Model from ->createOptionAction
Yeah, i was in a rush so i decided to take the easy way out bu tin the end it backfired. Should've gone with an observer in the first place. I refactored to an observer. Thanks for the help.
13 replies
Use ID on newly created Model from ->createOptionAction
Yeah, ill try to explain it in more detail. I have a form on my Project Model. This form has a select option to select a company to be associated with it. It also has a ->createOptionForm to create a new Company Model.
On my regular Company model i use afterCreate to send the form data over to an api, retrieve an ID and finally, I store all the form data + the newly retrieved ID on the Company. This works fine but i can't seem to get this working from within the ->createOptionForm() method.
I hope i'm being clear.
13 replies