+ Start a Discussion

SOQL Query to get product name from related custom object

How to get the name of a product in stead of the ID. Out of range issues. Query works fine in SOQL Explorer.
ri1__Product__r.ri1__Daily_Deposit__c,ri1__Product__c Gets ID and works fine ri1__Product__r.ri1__Daily_Deposit__c,ri1__Product__r.name, Gets name but concatenates results with Daily Deposit
Shashikant SharmaShashikant Sharma

There is no reason ri1__Product__r.name this will give you concatenated results with Daily Deposit in this query,  there must be some logic which have made the Name in product Concatenated with Daily Deposit . May be some trigger or workflow. Check your product record detail and verify Name field for the record which you are fetching detail. It must be already concatenated. 



Yes , you can get access Name by Using  ParentObject ___r.Name string in Query . Shashi is giving right suggestion that there might be change any body has written some code to append this value 'Daily..'