function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sivaextsivaext 

Is it required child object to store line items?

Hi , 

I have requirement where similar to Opportunity and opportunity line items. 

I am plan to use only one object with self relationship to achieve this. I knew roll up summary not possible. I am plan to wirte trigger to achieve this. 

Is there any potential drawback to follow this approach? any data base impacts?

Thanks Advance.
RamuRamu (Salesforce Developers) 
Probably a junction object would be a better match as you cann maintain the list of Products/Services in one object and the transactions on another object by having a mediator object(junction object) to link the transaction to the product/service. 

If you are going by your approach, you always need to create a new record to represent a product/service and another record to represent the new transaction. 

Reporting on how many product/servies are being used by what transactions and vice versa may be a problem.