Below I'm trying to explain how the objects are linked to each other and what needs to fetch from an indirectly related object. I want to update a field on Order object based on the value of a field CPN__c which is in the Customer Part Number object. Now the scenario is somewhat like this.
How the source object is related?
Customer Part Number has Lookup(Product), Lookup(Account) Product has Lookup(Order) Order has Master-detail(Account) Order has Lookup(Account) Not important.
Objects includes in the scenario.
1. Account 2. Order 3. Product 4. Customer Part Number
- Order has master-detail relationship with Account.
- Order has lookup to Product.
- Customer Part Number has lookup to Account and lookup to Product.
There is no direct link between Order and Customer Part Number objects. I need to pick a field CPN__c value and display it on the Order object's detail page.
Any ideas will be highly appreciable.