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
ricky88ricky88 

Real time cloning Records from multiple objects to a single object.

Scenario

 

We have 6 Objects with Master Details relationships with their respective Line Item Objects. Example as follows:

 

1. Purchase Order_from_Supplier with Line Items : to order items from Supplier

 

2. Delivery_Order_from_Supplier with Line Items : to track delivered items from Supplier

 

3. Goods_Returned_to_Supplier with Line Items : to track defective items returned to Supplier

 

4. Invoices_to_Customers with Line Items : to bill Customers for items sold

 

5. Payment_from_Customers with Line Items : to receive payment from Customer

 

6. Refund_to_Customers with Line Items : to refund money to Customer

 

------

Additional Lookup Relationships

 

Goods_Returned_to_Supplier has a lookup relationship to Delivery_Order_from_Supplier

 

Delivery_Order_from_Supplier has a lookup relationship to Purchase Order_from_Supplier

 

Refund_to_Customers has a lookup relationship to Payment_from_Customers

 

Payment_from_Customers has a lookup relationship to Invoices_to_Customers

 

--------

Challenges

 

1. How do I track if all my line items ordered per purchase order has been delivered as Supplier could make several deliveries per Purchase Order)

 

 

2. How do i know my item stock levels which include update of items delivered from supplier and sold to customer (there is no lookup relationship between Invoices_to_Customers and Delivery_Order_from_Supplier )

 

---------

Solution?

 

Do I have to clone a copy of all the line item records from the above 6 different objects into 1 object so that we can easily do calculations and reports from 1 consolidated object data and indirectly solve the above 2 challenges? If yes, what is the easiest way to clone the records real time to another object every time the user updates the records? 

 

The solution requires that the user sees the movement of the line items with serial numbers.

 

 

 

sfdcfoxsfdcfox

You may be able to use Rollup Summary fields on the products themselves assuming that all records include a master-detail to the associated product. You can then use formulas on the products itself that performs calculations based on the information you have rolling up into the six Rollup Summary fields.