• muthu.swi
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies
Hi Guys
 
How do I get account name of WhoId from Task in a single query? Is this possible? I know Who.Name gives contact name of WhoId, What.name gives account name of WhatId. But, Who.Account.Name doesn't work as Who doesn't have reference to Account.
 
Thanks a lot in advance
 
*Muthu*
Hi to all,
 
Is it possible to get contact/account details in a soql query applied on Task?  Something like this:
 
Select Id, Contact.Name, Account.Name From Task
 
where Task has reference to Contact and Account on WhoId and WhatId. When I tried this query I am getting the error:
 
INVALID_FIELD - Didn't understand relationship 'Contact' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
Is there any other way to get contact/account details without using a seperate soql query?
 
Thanks in advance.
 
*Muthu*
Hi
 
I have two entities Master and detail with no relationship. So, when I delete master I am deleting the detail reocords in Before Delete trigger. And, my code in the trigger is simple as:
 
if (Trigger.isDelete && Trigger.isBefore)
{
     for (Master__c master : Trigger.old)
     {
          Detail__c[] details = [Select Id from Detail__c Where Master__c = :master.Id];
          delete details;
     }
}
 
But I am getting this error when I delete the master record..
 
System.Exception: ORA-01086: savepoint 'ORACLE_SVPT_3108' never established
 
Could anyone help fix this? Thanks in advance.
 
Muthu
 
Hi
 
I have some apex code in a delete trigger. Is it possible to navigate to a certain page through the trigger?
 
Thanks in advance
 
Muthu
Hi to all,
 
Is it possible to get contact/account details in a soql query applied on Task?  Something like this:
 
Select Id, Contact.Name, Account.Name From Task
 
where Task has reference to Contact and Account on WhoId and WhatId. When I tried this query I am getting the error:
 
INVALID_FIELD - Didn't understand relationship 'Contact' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
Is there any other way to get contact/account details without using a seperate soql query?
 
Thanks in advance.
 
*Muthu*
Hi
 
I have two entities Master and detail with no relationship. So, when I delete master I am deleting the detail reocords in Before Delete trigger. And, my code in the trigger is simple as:
 
if (Trigger.isDelete && Trigger.isBefore)
{
     for (Master__c master : Trigger.old)
     {
          Detail__c[] details = [Select Id from Detail__c Where Master__c = :master.Id];
          delete details;
     }
}
 
But I am getting this error when I delete the master record..
 
System.Exception: ORA-01086: savepoint 'ORACLE_SVPT_3108' never established
 
Could anyone help fix this? Thanks in advance.
 
Muthu