Hi, How to if? Table OFFERS is reffed by OF...

(Vlad Roman) #1


How to if?

Table OFFERS is reffed by OFFER_PRODUCTS Table ORDERS is reffed by ORDER_PRODUCTS

Tables OFFERS and ORDERS have the same structure. Same with OFFER_PROD and ORDER_PROD.

How can i copy an offer and it’s reffed products from OFFERS table into ORDERS table? I know i can achieve this with API. But i don’t know exactly how to copy the reffs as well. Is there a way?

And one more thing if i want to make a copy of an offer in the same table (OFFERS) using Copy row (and edit) Action Event how the reffs are handled? Are the reffs copied? If yes what about their IDs and the ref ID? Are duplicated as well?

Thank you!

(Syed Faheemuddin) #2

Not the exact answer but one suggestion.

Can you club both the OFFER_PRODUCTS and ORDER_PRODUCTS tables into one? May be name it just PRODUCTS.

Then simply add two more columns OFFERS, ORDERS of type YES/NO to PRODUCTS table and then create 2 different slices ORDER_PRODUCTS, OFFER_PRODUCTS.

Can do same with OFFERS, ORDERS table