You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a master/detail relation between an invoice(master) and a detail entity (detail). The CRUD work very well for both master and detail entities.
My issue, is that I need to use the detail entity Id after I have saved the master entity(invoice).
The master (Invoice) and detail both have autoIncrement Ids.
Here is a piece of my code in the Save handler of the master repository:
protected override void AfterSave()
{
base.AfterSave();
if (Row.OrderItems != null)
{
foreach (var item in Row.OrderItems)
{
var purchaseInvoiceItemId = item.PurchaseInvoiceItemId.Value;
.....
item.PurchaseInvoiceItemId.Value = null when creating the record, it only has a value when updating.
How can I get the detail entity Id when creating the creating the detail record? or how can I refresh to get the Id.
The text was updated successfully, but these errors were encountered:
Hi Guys,
I have a master/detail relation between an invoice(master) and a detail entity (detail). The CRUD work very well for both master and detail entities.
My issue, is that I need to use the detail entity Id after I have saved the master entity(invoice).
The master (Invoice) and detail both have autoIncrement Ids.
Here is a piece of my code in the Save handler of the master repository:
protected override void AfterSave()
{
base.AfterSave();
if (Row.OrderItems != null)
{
foreach (var item in Row.OrderItems)
{
var purchaseInvoiceItemId = item.PurchaseInvoiceItemId.Value;
.....
item.PurchaseInvoiceItemId.Value = null when creating the record, it only has a value when updating.
How can I get the detail entity Id when creating the creating the detail record? or how can I refresh to get the Id.
The text was updated successfully, but these errors were encountered: