• SRIADI
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies

I am using AggregateResult for an SOQL query and passing the list of database result set to another static method in second class. There I am looping the AggregateResult list using for Loop. This is working fine in one sandbox but giving save error in another sandbox. It is saying "Save error: Invalid type: AggregateResult" while saving in another sandbox.

 

Please help in fixing this Save Error.

  • March 09, 2012
  • Like
  • 0

Hi,

 

I have two custom objects 'Fin_Journal__c' and 'Line__c'  they both have a master detial relationship, I am not able to insert new line.  Can anybody tell me where I am making mistake?

 

public class Fin_LineManager
{
public Line__c newLine{get; set;}
public Fin_Journal__c journal ;

public Fin_LineManager(ApexPages.standardController stdn)
{
newLine = new Line__c();
journal = [SELECT id FROM Fin_Journal__c WHERE id = :ApexPages.currentPage().getParameters().get('id')];
newLine.Journal__c = journal.id;
}

public PageReference save()
{
try
{
insert newline;
}
catch (DMLException e)
{
ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,'Error creating new contact.'));
}
return null;
}
}

 

 

Regards,

 

Meer

  • March 13, 2012
  • Like
  • 0

 Dim store As New X509Store("MY", StoreLocation.CurrentUser)

this is code in .net..........what variable type is used in salesforc for this variable?

Hi am new SFDC. i have Furniture__C custom object with Name,Type__C fields. So I need to insert,delete n update through code upto 100 records. i have exception in Update method. FATAL_ERROR|System.QueryException: List has more than 1 row for assignment to SObject. Furniture__c fr = [Select Name From Furniture__c Where Name = 'Das']; fr.Name = 'ram'; Update fr; any modifications or possibility to Update records. I need Update method code.

I am using AggregateResult for an SOQL query and passing the list of database result set to another static method in second class. There I am looping the AggregateResult list using for Loop. This is working fine in one sandbox but giving save error in another sandbox. It is saying "Save error: Invalid type: AggregateResult" while saving in another sandbox.

 

Please help in fixing this Save Error.

  • March 09, 2012
  • Like
  • 0