Getting error while saving three entities from a single save button
hy @Priyanka Singh
Why are you putting the personID on the Order.Id?
The id that you get from PersonCreateOrUpdate, is the person.id, you are trying create a new order in data base with the order.id = person.ID
And you have a lot of server action, in the same client action. Why don't you group all the server action in one?
The reason why you should group all server actions in your client action is for performance. Each server action in your client action gets translated by OutSystems by an API call to the OutSystems server.
Thank you.
Now I can solve this problem
Hi @Priyanka Singh,
Since you have productId and orderDetailId in your order entity, you must assign both values before saving order entity. Create product and orderdetail before creating order, then assign id values and create order.
Other than this order entity and order detail entity should have autonumber set to true. You cannot assign project id to orderId.
Hopefully this helps.
Regards,
Sameeksha Dwivedi
Hi,
What error you are getting ? Could you please provide screenshot or details of error.
regards
Only one entity is updated in the table.
The other 2 entities are not updated in the save button
Should be related with data integrity. Can you send the error from Service Center?
I am new to outsystems,not sure how to access service center.
Hi Priyanka,
From where you are creating order and order details. I checked in both tables Id is not auto increment. So I have doubt when you get data by aggregate getPersonById, it have order id and order details id as 0. Now when you try to create the records with these values it gets failed.
As Paulo mentioned could you please provide service center screenshot for this error.