EPI Server new Order Line Items Relation Object Creation.

Vote:
 

Hi,

I have a requirement of creating new object named Prescription which will have a relation with each Line Item in Order form.

With each line item I need to show the prescription details.

I have tried with business foundation where I can create a new object where I can create relation with contact list but there is no Line Item object with which I can create 1:1 relation of my new Object.

Please help and show the way I can do this.

This relation should also view from commerce manager order details in Line Items.

 

 

#176479
Mar 20, 2017 11:55
Vote:
 

Hi Arindam,

Your case is quite interesting and challenge. I've not got time to dig into this case but just have an idea.

LineItem.Properties is flexible and we could use LineItem.Properties to solve this case.

LineItem.Properties is a Hashtable, we could store Prescription to LineItem.Properties["Prescription"] - for example. But I'm not sure about those properties could save an object to DB, so IMO before storing Prescription to LineItem.Properties["Prescription"], we could serialize Prescription object - should be as a json string:

LineItem.Properties["Prescription"] = <Prescription json object>;

However, for display Prescription in Commerce Manager, we still need extending something in CM - you could contact Support team for better support for this case.

Regards,

/Son Do

#176566
Edited, Mar 22, 2017 2:59
Vote:
 

Regarding storing the data I'd go with Son Do's approach as well.

Regarding displaying it in Commerce Manager, the easiest way is to add columns to LineItem-rows in the details tab. This might not give a great overview of the lineitem/prescription if the prescription item has so many properties that it would add too many columns to the line item rows.

I can write up an example of how to do this if you want to go with this approach.

#176572
Edited, Mar 22, 2017 10:10
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.