• Mohammed Ayyub
  • NEWBIE
  • 0 Points
  • Member since 2013
  • CloudMaster


  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 0
    Replies
Replace each query by schema describe call:
Replcae this:
//REPLACE THIS LINE
RecordType closedWonRecordType = [SELECT Id from RecordType WHERE SobjectType = 'Opportunity' AND Name = 'Closed Won
' LIMIT 1];

//FROM
Id closedWonRecordTypeId = Opportunity.getDescribe().getRecordTypeInfosByName().get('Closed Won').getRecordTypeId();
Hi,

I am executing a batch class from post install script class that implement Installhandler interface, it executes successfully, but no batches are processed even there exists a lot of relavant records.

When I execute this batch class from elsewhere (developer console) rather than post install script class, its working fine and processing all of the records.

Also, note that both apex class are marked as "without sharing".

Any good answer would be greatly appreciated.

Thanks,
Hi Everybody,

While going through a prototype and anlysis, I got a strange behavoiur that a User with Customer Portal license can create Opportunity. It is abnormal because this user is Owner of such Opportunity that he can never access.
  • Now, if i am following this assumption then what will be other issues?
  • Is it possible that creation of an Opportunity from portal may stop?
Thanks,
Ayub Grazitti
(www.grazitti.com)

Hi All,

 

1. What is the best way of using try and catch in apec code?

2. What is disadvantage of putting whole code in try catch ? for example --

 

public class Demo{

try{

 

 

 /**here put all code

 

 

}catch(exception e){}

 

 

}

 

Thanks in Advance

CloudMaster

 

 

Hi,

 

Below are some queries on Chatter feed and Chatter Answer-

 

1. What is the difference between Chatter feed and Chatter Answer?

2. Can  we show Chatter Answer in Chatter feeds?

 

Thanks,

CloudMaster

Replace each query by schema describe call:
Replcae this:
//REPLACE THIS LINE
RecordType closedWonRecordType = [SELECT Id from RecordType WHERE SobjectType = 'Opportunity' AND Name = 'Closed Won
' LIMIT 1];

//FROM
Id closedWonRecordTypeId = Opportunity.getDescribe().getRecordTypeInfosByName().get('Closed Won').getRecordTypeId();
Hi,

I am executing a batch class from post install script class that implement Installhandler interface, it executes successfully, but no batches are processed even there exists a lot of relavant records.

When I execute this batch class from elsewhere (developer console) rather than post install script class, its working fine and processing all of the records.

Also, note that both apex class are marked as "without sharing".

Any good answer would be greatly appreciated.

Thanks,

Hi All,

 

1. What is the best way of using try and catch in apec code?

2. What is disadvantage of putting whole code in try catch ? for example --

 

public class Demo{

try{

 

 

 /**here put all code

 

 

}catch(exception e){}

 

 

}

 

Thanks in Advance

CloudMaster