• ricky88
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies

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.

 

 

 

We have ONE object with 3 different record types:

 

1. Purchase Orders (PO)

2. Invoices (Inv)

3. Official Receipts (OR)

 

There are three different operating branches that uses these, example as below:

 

1. New York

2. Sydney

3. Paris

 

We want to have different auto-numbers for these 3 different record types for these 3 different branches. Example as follows:

 

NY-PO-1001

NY-PO-1002

SYD-PO-1001

SYD-PO-1002

PA-PO-1001

PA-PO-1002

NY-Inv-1001

NY-Inv-1002

SYD-Inv-1001

SYD-Inv-1002

PA-Inv-1001

PA-Inv-1002

NY-OR-1001

NY-OR-1002

SYD-OR-1001

SYD-OR-1002

PA-OR-1001

PA-OR-1002

 

Using Auto-Numbers in Salesforce produces the result below, which we DO NOT WANT:

 

NY-PO-1001

NY-PO-1002

SYD-PO-1003

SYD-PO-1004

PA-PO-1005

PA-PO-1006

NY-Inv-1007

NY-Inv-1008

SYD-Inv-1009

SYD-Inv-1010

PA-Inv-1011

PA-Inv-1012

NY-OR-1013

NY-OR-1014

SYD-OR-1015

SYD-OR-1016

PA-OR-1017

PA-OR-1018

 

What is the solution without APEX or triggers for this?

 

If there is no standard solution in Salesforce, what do we need to do for APEX / Triggers to resolve the above?

 

 

I created a custom button (Create New Invoice) with the sample code below:
After clicking the custom button, i reach the desired page where the Accounts field is populated with the Person Account's name from the object where the custom button was originally placed. 
However, despite the name being correct, the error shows "Error: No matches Found".
I clicked on the magnifying glass and could select the same name from the lookup dialog box search result, which later on removed the error.
Screenshot with error resolved despite being the same name: 
-----
Example, if the Account.name is "Ricky Test", when i click on the custom button, it will populate "Ricky Test" in the desired page but the error shows "Error: No matches Found".
I have to then click on the magnifying glass and select the same name "Ricky Test" from the  lookup dialog box search result which then removes the error. 
It was the same name. How do i make sure the error doesn't occur in the first place?

 

 

I created a custom button (Create New Invoice) with the sample code below:
After clicking the custom button, i reach the desired page where the Accounts field is populated with the Person Account's name from the object where the custom button was originally placed. 
However, despite the name being correct, the error shows "Error: No matches Found".
I clicked on the magnifying glass and could select the same name from the lookup dialog box search result, which later on removed the error.
Screenshot with error resolved despite being the same name: 
-----
Example, if the Account.name is "Ricky Test", when i click on the custom button, it will populate "Ricky Test" in the desired page but the error shows "Error: No matches Found".
I have to then click on the magnifying glass and select the same name "Ricky Test" from the  lookup dialog box search result which then removes the error. 
It was the same name. How do i make sure the error doesn't occur in the first place?