AnsweredAssumed Answered

Child related record is not updating based on parent record

Question asked by muhammad.ikram@contedia.com on Oct 22, 2018
Latest reply on Oct 23, 2018 by philmodjunk

Hello Community,

 

I have and quotation system.

 

So I have this table structure.

 

Customers--->Quotes-->QuotesLineItem.

 

I have added duplicated order feature so user can duplicated the order and order line item and assign to different customer.

 

I have used following method to duplicate order and order line items.

set variable $orderid

duplicate record

set variable $newid

Go to layout - child layout

set field childTable::parentID = $orderid

perform find

 

 

set variable $path - get(temporarypath) & "temp.fmp12"

export records to $path

import records from $path

replace field contents childTable::parentID with $newid

return to parent layout

 

The order and order line item do get duplicated perfectly fine.

 

But when I go on to the duplicated order and change the customer; it create new customer record.

 

I have a layout based on orders.

 

On the top of layout I have customer selection field. Than, below I have portal showing line  item of quotes of that customer and order.

 

So When I duplicate record, go to the add line item layout and change the customer; it created new customer record and portal below becomes empty.

 

How I can resolve this.

Outcomes