You need to sign in to do that
Don't have an account?
Roshan Tamrakar
Random name for relationship name
Hi experts,
I wanted to have a many-to-many relationship between Asset and a custom object SP__c. For that I created a custom object Program_Asset__c. I added two lookup fields in it, one related to Asset and other related to SP__c. When I checked it in Apex Explorer, the child relationship name in Asset is some odd number and not in readable form (should have been Program_Assets__r). The highlighted item is the one.
Because of this my deployment fails in other org because it is used in my soql query and new package installation creates another random name for the relationship.
What went wrong?
Also, How do I know from apex class that I am currently in 'Desktop' page (console tab): https://na1.salesforce.com/ui/desktop/DesktopPage
Please help me.
Thanks,
-Roshan
I wanted to have a many-to-many relationship between Asset and a custom object SP__c. For that I created a custom object Program_Asset__c. I added two lookup fields in it, one related to Asset and other related to SP__c. When I checked it in Apex Explorer, the child relationship name in Asset is some odd number and not in readable form (should have been Program_Assets__r). The highlighted item is the one.
Because of this my deployment fails in other org because it is used in my soql query and new package installation creates another random name for the relationship.
Code:
Select Id, (Select SP__c, SP__r.Name From a.R00N30000002NWqzEAG) From Asset a Where a.Id ='02i30000001DcJa'
Also, How do I know from apex class that I am currently in 'Desktop' page (console tab): https://na1.salesforce.com/ui/desktop/DesktopPage
Please help me.
Thanks,
-Roshan
Thanks,
Andrew
Great! Thanks, it worked. Actually the field was not mandatory and I always skipped that. I never thought of that. You are the rescuer.
-Roshan
Salesforce uses a unique ID in lieu of a developer-assigned name. So up until the last Salesforce update, I could just reference the child relationship by it's unique SF-assigned Id.
However, as of the last release, AppExchange installation scripts add the application namespace prefix ( "myapp__" ) and the child relationship suffix ("__r") to the unique Id, making queries that work in the dev account break in the installed account.
To make matters worse, you can't just add the prefix and suffix strings in your dev account, because the prefix and suffix aren't used there.
I've been trying to get a fix from SF support for weeks now, with no success. Has anyone else found a solution?
Thanks,
- Bill
I'm making the SOQL call from inside the Flex toolkit. Is it possible this is now a flex toolkit issue?
Message Edited by Ron Wild on 10-25-2008 08:33 PM
I can't think of why you wouldn't be getting any results; let's troubleshoot this by phone. I've sent you contact information.
Thanks,
- Bill