• jagan
  • NEWBIE
  • 50 Points
  • Member since 2008

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

Cant figure out why this code is giving me a null point exception.

 

 

trigger Account_BeforeUpdate on Account (before update)
{
    Set<String> billCountry = new Set<String>();
    
    for(Account acc : trigger.new)
      {
          billCountry.add(acc.BillingCountry);
      }
      
      Map<String, Country__c> accountMap = new Map<String, Country__c>([SELECT Region__c FROM Country__c WHERE Name IN :billCountry]);
 
      for(Account acc: trigger.new)
      {
          acc.Region__c = accountMap.get(acc.BillingCountry).Region__c;
      }
}

 

Can you spot any errors in the Code?

  • November 12, 2010
  • Like
  • 0

Hi

 

I am experiencing a strange situation where the Grand Total of a report is wrong.

I have a report on opporutnity with three groupings and total revenue field is summarized for each grouping. After applying some fiters, I hidden the details of the report and did a printable view.

 

In the excel when I take the totals from the first grouping and count them, the total is different than the one showing in report. And that difference is huge in terms of revenue( more than 15 million) I am not able to figure what is the issue here, can any one please help.

 

Thanks,

Jagan

  • August 22, 2013
  • Like
  • 0

Hi  - I am getting a bad formant for account name and opportunity name while i am exporting the report in to excel. opportunity name is being reffered as "_HL_ENCODED_" + salesforce link to record + opportunity name + "_HL__blank_HL_". I could not find what is the issue here. can you please help ?

  • July 15, 2013
  • Like
  • 0

Is there any standard way to know the number of opportunity team members for each opportunity in the system ?

  • July 12, 2013
  • Like
  • 0

Hi, 

 

Can anyone help me on creating a stacked bar chart which shows count of leads captured from each lead source for particular date field ..say created date. 

 

I some how used wrapper class and arranged the data but here i am using static lead source values. We want to make this dynamic so that whenever a value is added in lead source we do not have to add the code for that value.

 

Please let me know if any one worked on this in any other way.

 

Thanks,

jagan

 

 

  • December 05, 2012
  • Like
  • 0

Hi,

 

I have a vf page and i am using apex:detail with inline editing as true in the page.

 

Inline editing works fine for every field except rich text area. When i double click on rich text area, it doesnt show the field for editing, but the save and cancel buttons will come (but wont work... means nothing will happen when i click save or cacel) and i have to refresh the page again.

 

I couldnt understand what is the problem here... :(

 

Can any of you please help me with this..

 

Thanks,

Jagan

  • July 12, 2012
  • Like
  • 0

Hi,

 

Can we Limit the Standard search Results based on an attribute ?

For example if we have check box viewable and if it is Unchecked . Can we make that Acccount Not appear in search Results ?

 

 

Thanks,

Jagan.

  • September 24, 2010
  • Like
  • 0

Hi all,

 

I have a java program which do the following

 

1.Gets the data from salesforce.

2.Forms a request string to query an external server.

3.Send request to that server and get the response from the server.

4.Get the required data from response and update it in slaesforce.

 

This is working fine when java program is executed on my machine. What we need now is to invoke this

java program from salesforce on a timely basis(for every 10 or 15 min)

 

If any one came across this situation ,Please help me regarding this, as we need this urgent.

 

Thanks & Regards,

 

Jagan.

 

 

  • March 03, 2009
  • Like
  • 0
Hi All,
 
 
We are currently facing an issue regarding SMS integration. 
 
We need to send the SMS automatically when a case is saved/edited. For this we have an apex class which consists  of  HTTPS callouts to access the SMS gateway of Value first 
and a trigger which invokes this apex class when ever a case is saved/edited.
 
Now, when ever the trigger is fired i'm getting this exception     "System.CalloutException: Callout from triggers are currently not supported"
 
I think it can be possible by S-Control  but the process should automatic.  
 
And this is very urgent for our project 
 
Pls suggest any solution /workaround  for the same.
 

 
Any help is appreciable.
 
 
Thanks  
Jagan.
  • January 28, 2009
  • Like
  • 0

Hi

 

I am experiencing a strange situation where the Grand Total of a report is wrong.

I have a report on opporutnity with three groupings and total revenue field is summarized for each grouping. After applying some fiters, I hidden the details of the report and did a printable view.

 

In the excel when I take the totals from the first grouping and count them, the total is different than the one showing in report. And that difference is huge in terms of revenue( more than 15 million) I am not able to figure what is the issue here, can any one please help.

 

Thanks,

Jagan

  • August 22, 2013
  • Like
  • 0

Hi  - I am getting a bad formant for account name and opportunity name while i am exporting the report in to excel. opportunity name is being reffered as "_HL_ENCODED_" + salesforce link to record + opportunity name + "_HL__blank_HL_". I could not find what is the issue here. can you please help ?

  • July 15, 2013
  • Like
  • 0

Is there any standard way to know the number of opportunity team members for each opportunity in the system ?

  • July 12, 2013
  • Like
  • 0

Hi, 

 

Can anyone help me on creating a stacked bar chart which shows count of leads captured from each lead source for particular date field ..say created date. 

 

I some how used wrapper class and arranged the data but here i am using static lead source values. We want to make this dynamic so that whenever a value is added in lead source we do not have to add the code for that value.

 

Please let me know if any one worked on this in any other way.

 

Thanks,

jagan

 

 

  • December 05, 2012
  • Like
  • 0

Hi,

 

I have a vf page and i am using apex:detail with inline editing as true in the page.

 

Inline editing works fine for every field except rich text area. When i double click on rich text area, it doesnt show the field for editing, but the save and cancel buttons will come (but wont work... means nothing will happen when i click save or cacel) and i have to refresh the page again.

 

I couldnt understand what is the problem here... :(

 

Can any of you please help me with this..

 

Thanks,

Jagan

  • July 12, 2012
  • Like
  • 0

Object: Membership__c  ()

On Insert

  • Field Assigned Marketer (lookup to User) will be assigned this way:

o   Program__r.New_Business_Marketer__c (text) has “Marketer” added to the end. The resulting string is used to query AccountTeamMembers for the associated Account: Role = New_Business_Marketer__c + ‘ Marketer’.

 

can anyone help me on this?????

I work with Person Accounts in my code. To get the Contact of such Account I use the following:

 

 

Contact personAccountContact = anyPersonAccount.Contacts[0];

 

 

That works. But I encountered quite unexpected problem when testing my code. I create a test Person Account like this:

 

 

Account account = new Account();
account.FirstName = 'First Name';
account.LastName = 'Last Name';
account.RecordTypeId = [
	select Id
	from RecordType
	where (Name='Person Account')
	and (SobjectType='Account')
].Id;
insert account;

 

But when I try to get the Contact of the created Account as described above I fails. The number of Contacts for created Account is 0. I debugged this code and found that RecordTypeId field is assigned with the proper value, but IsPersonAccount field is false and PersonContactId field is null. Where am I wrong?

 

  • November 12, 2010
  • Like
  • 0

Cant figure out why this code is giving me a null point exception.

 

 

trigger Account_BeforeUpdate on Account (before update)
{
    Set<String> billCountry = new Set<String>();
    
    for(Account acc : trigger.new)
      {
          billCountry.add(acc.BillingCountry);
      }
      
      Map<String, Country__c> accountMap = new Map<String, Country__c>([SELECT Region__c FROM Country__c WHERE Name IN :billCountry]);
 
      for(Account acc: trigger.new)
      {
          acc.Region__c = accountMap.get(acc.BillingCountry).Region__c;
      }
}

 

Can you spot any errors in the Code?

  • November 12, 2010
  • Like
  • 0

Can some tell me what I'm missing in this snippet of code from my test class?  I'm creating two user records to use through the test class.  I recieve a System.QueryException: List has no rows for assignment to SObject on the last line of the code. 

 

 

		Profile p = [SELECT Id FROM profile WHERE name='System Administrator'];  
		
		User u1 = new User(alias = 'newUser1', email='newuser1@testorg.com',  
					emailencodingkey='UTF-8', lastname='Testing1',   
					languagelocalekey='en_US', localesidkey='en_US', profileid = p.Id,  
					timezonesidkey='America/Chicago', username='newuser1@testorg.com');  
		
		User u2 = new User(alias = 'newUser2', email='newuser2@testorg.com',  
					emailencodingkey='UTF-8', lastname='Testing2',   
					languagelocalekey='en_US', localesidkey='en_US', profileid = p.Id,  
					timezonesidkey='America/Chicago', username='newuser2@testorg.com');  
		
		System.runAs(u1) {
			// Get Test User Id
			Id UserId = [Select Id From User where username = 'newuser1@testorg.com'].Id ;
			Id NewOwnerId = [Select Id From User where username = 'newuser2@testorg.com'].Id ;

 

 

Hi ,

 

I am trying to migrate configuration of existing sandbox to newly created sandbox using Force.com IDE.

I am not successful in doing so. When trying to validate deployment it return back with Failed message.

 

Can any one help me on this.

 

Thanks,

Sales4ce

While loading data into Lead object using Apex Data Loader, the LeadOwner field gets populated with the id used for data laoding. I am able to set other user as LeadOwner by loading the 18 characters long salesforce id of the user in OwnerId field. How can i change the LeadOwner to some other user during data loading without using salesforce ids? Thanks in advance.
  • October 14, 2010
  • Like
  • 0

Hi,

 

Can we Limit the Standard search Results based on an attribute ?

For example if we have check box viewable and if it is Unchecked . Can we make that Acccount Not appear in search Results ?

 

 

Thanks,

Jagan.

  • September 24, 2010
  • Like
  • 0

Is it  possible to extract the opp record Id's and the related Activities for a specific user through data loader, in data loader when am selecting the opp object and in the fields am selecting id and taskID__c and own ownerId = '005400000000lezcx' but in o/p iam jst getting the opp related to that owner but not the tasks in that opp., how to get the tasks and opp for a owner...........

Hi All,
 
 
We are currently facing an issue regarding SMS integration. 
 
We need to send the SMS automatically when a case is saved/edited. For this we have an apex class which consists  of  HTTPS callouts to access the SMS gateway of Value first 
and a trigger which invokes this apex class when ever a case is saved/edited.
 
Now, when ever the trigger is fired i'm getting this exception     "System.CalloutException: Callout from triggers are currently not supported"
 
I think it can be possible by S-Control  but the process should automatic.  
 
And this is very urgent for our project 
 
Pls suggest any solution /workaround  for the same.
 

 
Any help is appreciable.
 
 
Thanks  
Jagan.
  • January 28, 2009
  • Like
  • 0