You need to sign in to do that
Don't have an account?
record.Id returned via join seems different than record.Id in non-join query?
var result = sforce.connection.query("Select Name, Id, Parent.Name, Parent.Id, ParentId FROM Attachment Where Parent.Name = '"+ CaseId +"'");
I construct a string like this:
output += "<tr><td><a target=new href=https://nas4.salesforce.com/"+record.Id +">"+ record.Name + "</a></td></tr>"
However, the Id returned is slightly different from the attachment's actual Id. I suspect it's a relationship Id of sorts. For example, if the recordId is actually OOP300000VWTIEA4 (obtained by just doing a Select Id from Attachment where ParentId = xxx), the Id returned by my join query is OOP300000WDoIEAC.
What must I do to my join query to get the actual Id for the attachment? I'd need either some change to the query, or maybe there's a different method to open the attachment (would be very interested if someone could tell me a way to open attachment directly, without directing to the attachment detail page first).
Thanks
Rozanne
Has anyone else come across this behaviour before?
Thanks
Rozanne