You need to sign in to do that
Don't have an account?

Relating IDs of two custom objects
Need to compare ids of two objects in Master Detail Relationship. The two objects are Product and Booking. I've to compare them and to fetch their fields mapping their ids.
If you are mentioning salesforce Record's ID for object .Then record IDs were always unique . However ,you could use below syntax for relating two obejcts (have Mastr detail Releationship) .
Select Id ,(select Test__r from Booking__C) from Product ;
OR similarly,
List<Product> Lst_product = [Select Id ,(select Test__r from Booking__C) from Product ];
Above will be able to relate two objects (which has M Detail Relationship)