• GregWax
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies

I need to select all acounts that the current user is the owner or accounts where the current user is in the accountteammember.

 

 

This is the code that I am testing in ForceIDE

 

select a.id, a.ownerid, a.name from account a where a.ownerId  =  '0056000010dFwAAI' or  a.id in (select b.accountid from accountteammember b where b.userid = '00560000001188cAAA' )

 

Ideally this is what I want to use:

select a.id from accounts a where a.OwnerId = \''+UserInfo.getUserId()+'\' or  a.id in ( select accountID from accountteammember where  userid  =  \''+UserInfo.getUserId()+'\'

 

I receive the follwing error message "Malformed Query:  Semi join sub selects are not allowed with the 'or' operator.

 

I would appreciate any guidance.

 

Thank you.

Page: Account

 

Trigger:  before insert, before update

 

Debug Log:

 

METHOD_ENTRY|[315]|01pP00000008Yot|Mappable.invokeWebService(System.Http, System.HttpRequest)

 

METHOD_ENTRY|[170]|System.Http.send(APEX_OBJECT)

 

EXCEPTION_THROWN|[170]|System.CalloutException: Callout from triggers are currently not supported.

 

 

It has been suggested to use @future, however I need real time validation and @future methods are asynchronous.

 

I appreciate any suggestions

Page: Account

 

Trigger:  before insert, before update

 

Debug Log:

 

METHOD_ENTRY|[315]|01pP00000008Yot|Mappable.invokeWebService(System.Http, System.HttpRequest)

 

METHOD_ENTRY|[170]|System.Http.send(APEX_OBJECT)

 

EXCEPTION_THROWN|[170]|System.CalloutException: Callout from triggers are currently not supported.

 

 

It has been suggested to use @future, however I need real time validation and @future methods are asynchronous.

 

I appreciate any suggestions

Can anyone suggest, how ca we delete apex class from production.

please provide step-step process to delete it from prod. through Force.com Eclipse.

  • October 29, 2010
  • Like
  • 1

Using the sample code from the Apex Language reference, I am trying to find out how many Contact records I have:

 

Integer contactCount = [SELECT COUNT() FROM Contact];

 

This raises an error "Too many query rows: 501" -- which implies that I cannot get a simple rowcount on tables with more than 500 rows. Is this true? Do I actually have to use a loop and queryMore() to find out how many rows I have in a table?

 

TIA,

 

John

  • May 05, 2009
  • Like
  • 0