• Juan Spagnoli
  • NEWBIE
  • 225 Points
  • Member since 2011
  • Senior Developer
  • Virtual Company Services


  • Chatter
    Feed
  • 5
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 83
    Replies
Hi,

I am editing the record...............but trigger is firing in trigger.isafter && trigger.isupdate methods..............getting this below error 
Error:Apex trigger Opp1Trigger caused an unexpected exception, contact your administrator: Opp1Trigger: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Class.opp1triggerhandler.UpdateTypeonopp: line 23, column 1
Information

Here is my method code
public static void UpdateTypeonopp(list<Opportunity1__c> lstopp1){
    
    system.debug('UpdateTypeonopp method calling');
    list<id> opprecords = new list<id>();
    for(Opportunity1__c opp1: lstopp1){
        if(opp1.Opportunity__c <>null && opp1.StageName__c == 'Qualification'){
        system.debug('UpdateTypeonopp method executedinloop');
    opprecords.add(opp1.Opportunity__c);
    }
    
    }
        
        for(Opportunity opp : [select id,Type from Opportunity where id = :opprecords]){
        opprec = new list<Opportunity>();
        opp.Type = 'New Customer';
        opprec.add(opp);
        }
        
        try{
        if(opprec.size()>0){
        update opprec;-------------------------getting error here
      }  
      }
      catch (dmlexception e){}
    }




 
  • April 15, 2016
  • Like
  • 0

Hello,

 

This is probably something pretty basic, but I am lost.  I have a custom object called Opportunity_Stage__c.  I created a custom controller because I want to have some function that opens various sections based on a user click.  However, I cannot save the controller because I keep getting the error:

 

Error: Unknown property 'Opportunity_Stage_Manager__cStandardController.Opportunity'

 

 

Can anyone help me understand why I am getting this?  My VF page and controller are below:

 

VF Page:

<apex:page standardController="Opportunity_Stage__c" tabStyle="Opportunity" ShowHeader="TRUE" extensions="EditOppMgmtController">

<apex:form >
<apex:actionFunction name="stage1Status" action="{!Stage1}" rerender="NewQualifiers" onComplete="StatusIcon();"/>
<apex:actionFunction name="stage2Status" action="{!Stage2}" rerender="NewQualifiers" onComplete="StatusIcon();"/>
<apex:actionFunction name="stage3Status" action="{!Stage3}" rerender="NewQualifiers" onComplete="StatusIcon();"/>
<apex:actionFunction name="stage4Status" action="{!Stage4}" rerender="NewQualifiers" onComplete="StatusIcon();"/>
<apex:actionFunction name="stage5Status" action="{!Stage5}" rerender="NewQualifiers" onComplete="StatusIcon();"/>

<apex:outputPanel id="msgs">
<apex:pageMessages />
</apex:outputPanel>

 

<apex:repeat value="{!Opportunity_Stage_Manager__c}" var="opp">


<apex:outputPanel rendered="{!IF(opp.Opportunity_Type__c = 'New Business','true','false')}">


<!-- HEADER ROWS -->

<table columns="2" width="100%" >
<tr>
<td width="15%" >
Sales Rep:
</td>
<td width="30%" >
{!Opportunity.Owner.Name}
</td>
<td width="5%">
&nbsp;
</td>
<td align="right" width="25%">
<apex:commandLink id="Stage1n" value="Stage 1 - Identify Target" onComplete="stage1Status();" />&nbsp;&nbsp;&nbsp;
</td>
<td width="20%" >
<hr style="height:15px; border:none;
margin:0;" align="left" width="0%"/>
</td>
<td width="5%">
{!IF(opp.S1_New_Completed__c=null,0,opp.S1_New_Completed__c)}%
</td>
</tr>

<tr>
<td width="15%" >
Account Name:
</td>
<td width="30%" >
{!Opportunity.Account.Name}
</td>
<td width="5%">
&nbsp;
</td>
<td align="right" width="25%">
<apex:commandLink id="Stage2n" value="Stage 2 - Qualify Target" onComplete="stage2Status();" />&nbsp;&nbsp;&nbsp;
</td>
<td width="20%" style="border: 2px solid silver;padding:none">
<hr style="height:15px; border:none;
margin:0;" align="left" width="0%"/>
</td>
<td width="5%">
{!IF(opp.S2_New_Completed__c=null,0,opp.S2_New_Completed__c)}%
</td>
</tr>

</table>

 

<!--QUALIFIER TABLES-->

<apex:outputPanel id="NewQualifiers">
&nbsp;<br/>
&nbsp;<br/>
<apex:outputPanel rendered="{!IF((Stage1Qual=True || (Stage1Qual=False && Stage2Qual=False && Stage3Qual=False && Stage4Qual=False && Stage5Qual=False)),'true','false')}">
<table width="100%">
<tr >
<td colspan="6">
<div >STAGE 1 - IDENTIFY TARGET</div><br></br>
</td>
</tr>
<tr >
<td width="1%" colspan="3" align="center">
Stages
</td>
<td width="5%">
Status
</td>
<td width="10%">
Date Completed
</td>
<td width="35%">
Comments
</td>
</tr>

<tr valign="middle" >
<td colspan="6"><br/></td>
</tr>

<tr valign="middle" >
<td width="1%">
&nbsp;
</td>
<td width="1%">
<img src="/s.gif" alt="" class="helpOrb" title="Why this stage?"/>
</td>
<td width="29%">
Cconfirmed
</td>
<td width="5%" align="center">

<div id="StatusIcon" >
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP7" class="icon default" id="R" name="s1q1n"/>
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP8" class="icon" id="Y" name="s1q1n"/>
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP6" class="icon" id="G" name="s1q1n"/>
</div>
</td>
<td width="10%" align="center">
<apex:inputField value="{!opp.S1Q1_New_Date__c}" />
</td>
<td width="35%">
<apex:inputField value="{!opp.S1Q1_New_Comments__c}" Style="width:98%"/>
</td>
<td width="1%">
<apex:inputField value="{!opp.S1Q1_New__c}" styleClass="s1q1n" style="visibility:hidden; width:10%;"/>
</td>
</tr>

<tr valign="middle" >
<td colspan="6"><br/></td>
</tr>
<tr valign="middle" >
<td colspan="6"><br/></td>
</tr>

<tr valign="middle">
<td width="1%">
<img src="/servlet/servlet.FileDownload?file=015S0000000S3wj" alt="Essential" title="Essential"/>
</td>
<td width="1%">
<img src="/s.gif" alt="" class="helpOrb" title="What are the client's Needs"/>
</td>
<td width="29%">
Client shared a problem
</td>
<td width="5%" align="center">

<div id="StatusIcon" >
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP7" class="icon default" id="R" name="s1q2n"/>
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP8" class="icon" id="Y" name="s1q2n"/>
<img src="/servlet/servlet.FileDownload?file=015S0000000PrP6" class="icon" id="G" name="s1q2n"/>
</div>
</td>
<td width="10%" align="center">
<apex:inputField value="{!opp.S1Q2_New_Date__c}" />
</td>
<td width="35%">
<apex:inputField value="{!opp.S1Q2_New_Comments__c}" Style="width:98%"/>
</td>
<td width="1%">
<apex:inputField value="{!opp.S1Q2_New__c}" styleClass="s1q2n" style="visibility:hidden; width:10%;"/>
</td>
</tr>

</table>

</apex:outputPanel>

</apex:repeat>
</apex:form>

</apex:page>

 

 

Controller:

 

public class EditOppMgmtController{

public EditOppMgmtController(ApexPages.StandardController stdcontroller) {}

public boolean Stage1Qual {get; set;}
public boolean Stage2Qual {get; set;}
public boolean Stage3Qual {get; set;}
public boolean Stage4Qual {get; set;}
public boolean Stage5Qual {get; set;}

public void Stage1() {
Stage1Qual = true;
Stage2Qual = false;
Stage3Qual = false;
Stage4Qual = false;
Stage5Qual = false;
}
public void Stage2() {
Stage1Qual = false;
Stage2Qual = true;
Stage3Qual = false;
Stage4Qual = false;
Stage5Qual = false;
}
public void Stage3() {
Stage1Qual = false;
Stage2Qual = false;
Stage3Qual = true;
Stage4Qual = false;
Stage5Qual = false;
}
public void Stage4() {
Stage1Qual = false;
Stage2Qual = false;
Stage3Qual = false;
Stage4Qual = true;
Stage5Qual = false;
}
public void Stage5() {
Stage1Qual = false;
Stage2Qual = false;
Stage3Qual = false;
Stage4Qual = false;
Stage5Qual = true;
}
}

 

  • June 03, 2013
  • Like
  • 0

Compile Error: Variable does not exist: atm at line 52 column 32

it's hitting on the line atms.add(atm); but I just declared the atm the line before - please assist! I must be missing something obvious? Thanks!

 

 

trigger UserActivatedTeamCoverage on User (after insert, after update) {

    //when a user is activated or inserted, the should be added to the AccountTeams of Accounts they cover via TeamMember
    
    
    // declare some lists
    
    List < EntitySubscription > esSet = new List < EntitySubscription > ();
    List < AccountTeamMember > atms = new List < AccountTeamMember > ();
    List <coverage_Person__c> CPS = new List <Coverage_Person__c> ();
    List < Double > empIds = new List < Double > ();
    List < ID > UserID = new List < ID > ();
    List < AccountShare > ASSES = new List < AccountShare > ();
   
   //add info from the users to the lists for users who are active and have an EMP_id (all should!)
   
    For (User u1:trigger.new){
        if(u1.isActive=true) if (u1.EMP_id__c !=null)
        empIds.add(u1.Emp_Id__c);
        UserID.add(u1.id);
   }
   
   //get a list of team memberships for this person
   
   List <Coverage_Person__c> CP3 = [select name, id, emp_id__c, Coverage_Team__c  from Coverage_Person__c where emp_id__c IN: empIds];
   system.debug('CP3 the list of coverages=========================='+cp3);
   
   //add the teams to a list
    List <id> CP3Teams   = new List <ID>();
    for(Coverage_person__c es:cp3){CP3Teams.add(es.Coverage_Team__c);}
   system.debug('CP3Teams=======================the teams ids'+CP3Teams);
   
   
   //get the assigned teams of these Teams
   
   List <Assigned_Team__c> Assignments = [select name, id, emp_id__c, Account__c from Assigned_Team__c where Coverage_team__c IN: CP3Teams or EMP_id__c IN: empIds];
   system.debug('assignments========assigned teams========'+Assignments);
   
   //add the ids of the accounts from the AssTeams to a list
   List <id> AssignmentsAccounts = new List <id>();
   for (Assigned_Team__c os:Assignments){AssignmentsAccounts.add(os.Account__c);}
   system.debug('Assignments Accounts ids ======================= '+AssignmentsAccounts);
   
   //loop through User and find the link to the account, then create an accountTeamMember record for them
   
      For (User u1:Trigger.new){
          For (Coverage_Person__c C:CP3){
              if(c.User__c==u1.id)
                  For (Assigned_Team__c at:Assignments){
                      if(at.Coverage_Team__c==c.Coverage_Team__c)
                      AccountTeamMember atm = new AccountTeamMember (AccountID=at.Account__c, UserId=u1.id, TeamMemberRole='Coverage');
                      atms.add(atm);
                   }
                }
           }
    insert atms;
}

 

  • February 22, 2013
  • Like
  • 0
Hi, I'm opening this topic hoping that someone from SF Staff help me to understand why in the last days our org suddenly started to have a high number of API usage per day. We already checked API Usage report, but that doesn't give us what is consuming the api. 

What I would like to have is a Splunk report from the last two days from Event Logs with IP, UserId and Count of api calls.

Could be possible please? The org Id is: 00DG0000000ii42

Thanks
I'm posting in the forum because I asked usign a case and I got kicked.

I need the creation of a skinny table because I'm getting timeout in a scheduled query. I'm getting the message:

First error: SQLException [common.exception.SfdcSqlException: ORA-01013: user requested cancel of current operation

select /*Apex.Class.BatchApexMetricSummarization.start: line 31*/ *
from (select "Cust_ID__c",
"Id"
from (select t.deleted "IsDeleted_...


That is happening because is taking more than 10 minutes to proceed.

The query is simple:

Select Cust_ID__c From Metrica_Diaria__c Where Fecha_de_Metrica__c >= :dateFrom AND Fecha_de_Metrica__c <= :dateTo AND Summarization_Date__c = \'N/S\' Order By Cust_ID__c limit 50000

When:
  • dateFrom = today - 3 months
  • dateTo = today - 1 day

Fecha_de_Metrica__c and Summarization_Date__c are indexed field, so I don't have much to do here.

Metrica_Diaria__c is a custom object with 1.942.440 records and I'm query 500k approximately (overall target records).

The fields that I need are:
Cust_ID__c, Fecha_de_Metrica__c, Summarization_Date__c, Cuenta__c

The question is:
How I get the Skinny Table created?

Thanks
I tried without success to fix this SF's issue. I edited a class that was not longer used (couldn't delete it) to reduce useless code, but SF is showing me the same lines count than before. I know that Salesforce save metadata of apex classes in an object, but we cannot access to that table. I attached a screen showing the issue, I don't know what can I do to fix it. I fear that is affecting my org's apex coverage level:


User-added image

Thanks for the help.

PD: I already tried to delete the class using the IDE, but It gave me an error related to AsyncApexJobs, like there was a job using that class, but really there was not.
How can we identify which query is giving us timeout in a Batch Apex processing?  We have a Batch Apex that is aborting after N executions. The aborting is caused by timeouts in Oracle Database, and it happens randomly. We cannot see which query is causing it because SFDC doesn't allow you to see it in the UI. We checked them in the Query Plan Tool and none involves tables with more than 150.000 records (low volume). (We have already read about Query Optimizer and High Volumes.)

I already logged a case, but of course they sent me to the forum, even when the only people who can tell me what I need are them.

Sonam, could you help me find the query?, this issue has been burning for some time now, thank you!
Hi, I'm trying to do something really simple that already did in other times, i'm doing a link to an attachment from my site, for example:

http://mysiteurl/servlet/servlet.FileDownload?file=00PE000000ChmGbMAJ

And i get "An error has occurred while processing your request. We apologize for the inconvenience. Error ID: 834158013-11877 (63307295)"

I can't know what is happening, I have other attachments linked in the same way and they works fine. The parent's object is new, I'd already give access to the object in the site's profile (view all).

Please, I would like if someone from SFDC's support could tell me what is happening in the background. If I create a case, they will send me back to the forum.

Thanks a lot. 
Hi, I'm having an issue in Summer 14' organization that I had never seen. When I try to access a Visualforce Page like I usually do, I get a blank page.


For example, If I try:

https://virtualseller-6602.cloudforce.com/apex/testVF

I get:

https://virtualseller-6602--c.na17.visual.force.com/visualforce/recsession?sid=00Do0000000K6Rm!AXftXXXXXXXXJcxkUqKgCyAJeBmZzgMXTYBMp0KkIDAgbUtzLBRv2J18hTjc4qTS4RU2D9XtlyeOtUl1sT3Stb712h7h&inst=o&cshc=0000000O8H60000000K6Rm&retURL=https%3A%2F%2Fvirtualseller-6602--c.na17.visual.force.com%2Fapex%2FtestVF

And stops there.
It seems that something goes wrong with the session validation and I don't know why. It's happening with ALL the Visualforce Pages of the org.

Is anyone having the same problem/issue?
Thanks

I'm getting an internal error when I hit "Upload" button in a Managed Package to create a new version of our application, I don't know why. We run all tests and there are no failures. The error that we are getting is:

An internal server error has occurred
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

Thank you again for your patience and assistance. And thanks for using salesforce.com!

Error ID: 213584053-89103 (-1623719448)


We reaised a Case to Salesforce's support. Is someone getting the same message??

Thanks

I realized that when I tried to edit an Apex class using chrome, it failed loading the code editor. It's giving a javascript error:

 

Uncaught ReferenceError: setAttr is not defined

 

at line 411 of edit_area_loader.js library.

 

I have the last version of chrome: Versión 26.0.1410.64 m

 

Does anyone experiencing the same problem?

 

Regards.

Hi guys, with the new Geolocation's fields I had the need of create an apex class for converting decimal values to degree strings, like SFDC do with the coordinates.

 

I want to share the class with the community:

 

public class GeolocationDecimalToDegreesConverter{
    public static String convert(Decimal latitude, Decimal longitude){
        return convertLatitud(latitude) + ' ' + convertLongitude(longitude);
    }

    public static String convertLatitud(Decimal latitude){
        String result = '';
        if(latitude != null){
            String direction = 'N';
            if(latitude < 0){
                direction = 'S';
            }
            result = convert(latitude) + direction;
        }
        return result;
    }

    public static String convertLongitude(Decimal longitude){
        String result = '';
        if(longitude != null){
            String direction = 'E';
            if(longitude < 0){
                direction = 'W';
            }
            result = convert(longitude) + direction;
        }
        return result;
    }
        
    private static String convert(Decimal d){
        d = d.abs();

        //degrees
        Integer i = d.intValue();
        String s = String.valueOf(i) + '°';
        
        //minutes
        d = d - i;
        d = d * 60;
        i = d.intValue();
        s = s + String.valueOf(i) + '\'';
        
        //seconds
        d = d - i;
        d = d * 60;
        i = d.round().intValue();
        s = s + String.valueOf(i) + '"';
        
        return s;
    }
}

 Test:

 

@IsTest
public class TestGeolocationDecimalToDegreesConverter{
    private static testmethod void test(){
        Decimal latitude = -38.0168573067988;
        Decimal longitude = -57.5689172744751;
        
        String result = GeolocationDecimalToDegreesConverter.convert(latitude, longitude);
        System.AssertEquals('38°1\'1"S 57°34\'8"W', result);
    }
}

 Hope it'll be helpful, regards!

Juan Martín.

 

PD: The latitude and longitude used in test is from my actual home, please do not drop a bomb there :P

Hi guys, I realized than from the 25.0 API version, SObject describe's methods are not working fine, I tried the example in Force.com Apex Guide and gave me an empty map:

 

Map<String, Schema.FieldSet> FsMap =  Schema.SObjectType.Account.fieldSets.getMap();

 Same with:

 

Schema.DescribeSObjectResult d = Account.sObjectType.getDescribe();
Map<String, Schema.FieldSet> FsMap = d.fieldSets.getMap();

 or with:

 

Schema.SObjectType sot = Schema.getGlobalDescribe().get('Account');
Schema.DescribeSObjectResult d = sot.getDescribe();
Map<String, Schema.FieldSet> FsMap = d.fieldSets.getMap();

 

Anyone had the same problem? Is there any solution to this issue?

 

Thanks a lot.

Hi! I'm looking for some info about "Batchable instance is too big" exception and I couldn't find nothing... Anyone have a clue about why this exception is triggered?

 

Thanks a lot! 

Hi guys, I'm stuck here with "System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out".

 

I know that you cannot do a DML operation before making a callout, but in my case, I'm not doing any operation!! It seems that the problem is when I call to a future method before the callout... I have to do an update that it doesn't need to be synchronized with my normal flow, and that it's why I'm using a @future method. 

 

Did anyone have to face something like this?

 

Thanks!

Hi, Does anybody know when SFDC will release Apex Rest API for Production environment? I couldn't find information about it, all that I found is from Summer '11. 

 

Thanks!!!

 

 

Hi there, I'm using SFDC REST API for doing some updates on Case from outside SFDC, and when I set some value (ex. Status), the PATCH action triggers the active assignment rules of the org. Consequently, case owners are changed. This is not happening if I update a case from the edit page (except I check "Assign using active...").

 

So... Why this is happens using Rest API? 

Anyone knows how to avoid this issue?

 

Thanks!

I'm with the new system log console and I can't find how to download a log... Any clue? : /

 

Thx.

I realized that when I tried to edit an Apex class using chrome, it failed loading the code editor. It's giving a javascript error:

 

Uncaught ReferenceError: setAttr is not defined

 

at line 411 of edit_area_loader.js library.

 

I have the last version of chrome: Versión 26.0.1410.64 m

 

Does anyone experiencing the same problem?

 

Regards.

Hi there.

In my lightning app I have a few components:
  • one component has a ui:inputSelect and registers an event. the ui:inputSelect has a change attribute that fires a function, wherein the selected text (an ID) is put in an event and fired.
  • one component that handles the event, is an aura:iteration list of a component that, on handling the event, should retrieve a list of items where a master-child lookup is the sent ID of the master object. This then displays all those child objects.
  • the other component that handles the event, has three inputText fields, that are supposed to display the other fields of the master object
The problem: either the event seems to not be fired, or the handlers seem to not be activated.

I put console.debug's, alerts and component.set("v.testmessage", "fired") 's in the handlers but they never execute.
I then put one of the handlers as the init-handler and then it did execute the handler (with an undefined ID since the event hadn't yet been fired, which is reasonable).

I have triple-checked the event name, event type and handler action, everything matches. I have no compilation problems, I have no errors when I am using my app. 
I also have no response whatsoever from my event. Any ideas?

**Registering component**
<aura:component controller="PrefixMasterHeaderSelectorController">
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <aura:registerEvent name="updateMaster" type="c:PrefixMasterEvent" />
    <aura:attribute name="masters" type="PrefixMaster__c[]"/>
      
    <label class="slds-master-element__label" for="masterSelector">Select a master to work with:</label>
    <div class="slds-master-element__control">
        <div class="slds-select_container">
            
            <ui:inputSelect aura:id="masterID" class="slds-select" change="{!c.masterHasChanged}">
                <aura:iteration items="{!v.masters}" var="master">
                    <ui:inputSelectOption text="{!master.Id}" label="{!master.Name}" />
                    <!-- + ' (Last modified: ' + master.LastModifiedDate + ' by ' + master.LastModifiedBy.Name + ')'}"/> -->
                </aura:iteration>	
                <ui:inputSelectOption text="newMaster" label="Create a new master" />
            </ui:inputSelect>
            
        </div>
    </div>

    <c:PrefixMasterHeaderMaster />
</aura:component>

**Registering controller**
({
    doInit : function(component, event, helper) {
        // Create the action
        var action = component.get("c.getMasters");
    
        // Add callback behavior for when response is received
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (component.isValid() && state === "SUCCESS") {
                component.set("v.masters", response.getReturnValue());
            }
            else {
                console.log("Failed with state: " + state);
            }
        });
    
        // Send action off to be executed
        $A.enqueueAction(action);
    },
    
    masterHasChanged : function(component, event, helper) {
        var masterID = component.find("masterID").get("v.value");
        var masterEvent = component.getEvent("updateMaster");
        masterEvent.setParams({"master" : masterID})
        masterEvent.fire();
        
		console.debug('UPDATE MASTER = ' + masterID);
        alert('Hiya! masterEvent ' + masterEvent.getParam("master"));
    }
		
})

**List-child component**
<aura:component controller="PrefixListChildsController">
	<aura:handler name="updateForm" event="c:PrefixFormEvent" action="{!c.loadChilds}" />
    <aura:attribute name="childs" type="PrefixChild__c[]"/>
    
	<!--   	<aura:handler name="saveChild" event="c:PrefixChildEvent" action="{!c.handleAddItem}"/> -->
    <!--	to reload the masters after adding a new child -->
    
    <div>
        <header class="slds-p-top--small">
            <h3 class="slds-text-heading--small">Childs</h3>
        </header>
        
        <div id="list" class="row">
            <aura:iteration items="{!v.childs}" var="child">
                <aura:if isTrue="{!child.Order__c % 2 == 1}">
                        <div class="slds-p-around--small" style="background-color: lightblue; border-radius: 10px">
                            <c:PrefixChild child="{!child}"/>
                        </div>
                    <aura:set attribute="else" >
                        <div class="slds-p-around--small" style="background-color: none; border-radius: 10px">
                            <c:PrefixChild child="{!child}"/>
                        </div>
                    </aura:set>
                </aura:if>
            </aura:iteration>
            {!v.testEventmessage}
            <c:PrefixNewChild />
        </div>
    </div>

</aura:component>

**List-child controller.js**
({
	loadChilds : function(component, event, helper) {
 	    var action = component.get("c.getChilds");
		var masterID = event.getParam("master");    
    	action.setParams({ "masterID" : masterID });
        
        console.debug('master id = ' + masterID);
        alert('load childs ' + masterID);
        component.set("v.testEventmessage", masterID);

        // Add callback behavior for when response is received
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (component.isValid() && state === "SUCCESS") {
                component.set("v.childs", response.getReturnValue());
            }
            else {
                console.log("Failed with state: " + state);
            }
        });
        
        // Send action off to be executed
        $A.enqueueAction(action);
    }
})


 
Hi,

I am editing the record...............but trigger is firing in trigger.isafter && trigger.isupdate methods..............getting this below error 
Error:Apex trigger Opp1Trigger caused an unexpected exception, contact your administrator: Opp1Trigger: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Class.opp1triggerhandler.UpdateTypeonopp: line 23, column 1
Information

Here is my method code
public static void UpdateTypeonopp(list<Opportunity1__c> lstopp1){
    
    system.debug('UpdateTypeonopp method calling');
    list<id> opprecords = new list<id>();
    for(Opportunity1__c opp1: lstopp1){
        if(opp1.Opportunity__c <>null && opp1.StageName__c == 'Qualification'){
        system.debug('UpdateTypeonopp method executedinloop');
    opprecords.add(opp1.Opportunity__c);
    }
    
    }
        
        for(Opportunity opp : [select id,Type from Opportunity where id = :opprecords]){
        opprec = new list<Opportunity>();
        opp.Type = 'New Customer';
        opprec.add(opp);
        }
        
        try{
        if(opprec.size()>0){
        update opprec;-------------------------getting error here
      }  
      }
      catch (dmlexception e){}
    }




 
  • April 15, 2016
  • Like
  • 0
I'm posting in the forum because I asked usign a case and I got kicked.

I need the creation of a skinny table because I'm getting timeout in a scheduled query. I'm getting the message:

First error: SQLException [common.exception.SfdcSqlException: ORA-01013: user requested cancel of current operation

select /*Apex.Class.BatchApexMetricSummarization.start: line 31*/ *
from (select "Cust_ID__c",
"Id"
from (select t.deleted "IsDeleted_...


That is happening because is taking more than 10 minutes to proceed.

The query is simple:

Select Cust_ID__c From Metrica_Diaria__c Where Fecha_de_Metrica__c >= :dateFrom AND Fecha_de_Metrica__c <= :dateTo AND Summarization_Date__c = \'N/S\' Order By Cust_ID__c limit 50000

When:
  • dateFrom = today - 3 months
  • dateTo = today - 1 day

Fecha_de_Metrica__c and Summarization_Date__c are indexed field, so I don't have much to do here.

Metrica_Diaria__c is a custom object with 1.942.440 records and I'm query 500k approximately (overall target records).

The fields that I need are:
Cust_ID__c, Fecha_de_Metrica__c, Summarization_Date__c, Cuenta__c

The question is:
How I get the Skinny Table created?

Thanks
I tried without success to fix this SF's issue. I edited a class that was not longer used (couldn't delete it) to reduce useless code, but SF is showing me the same lines count than before. I know that Salesforce save metadata of apex classes in an object, but we cannot access to that table. I attached a screen showing the issue, I don't know what can I do to fix it. I fear that is affecting my org's apex coverage level:


User-added image

Thanks for the help.

PD: I already tried to delete the class using the IDE, but It gave me an error related to AsyncApexJobs, like there was a job using that class, but really there was not.
How can we identify which query is giving us timeout in a Batch Apex processing?  We have a Batch Apex that is aborting after N executions. The aborting is caused by timeouts in Oracle Database, and it happens randomly. We cannot see which query is causing it because SFDC doesn't allow you to see it in the UI. We checked them in the Query Plan Tool and none involves tables with more than 150.000 records (low volume). (We have already read about Query Optimizer and High Volumes.)

I already logged a case, but of course they sent me to the forum, even when the only people who can tell me what I need are them.

Sonam, could you help me find the query?, this issue has been burning for some time now, thank you!
Hi

We are trying to build a package and it is showing Package Upload Failed even after having overall Coverage 80% which is greater than the required 75%.
Error Message : Average test coverage across all Apex Classes and Triggers is 74%, at least 75% test coverage is required.

Org ID: 00D90000000KenM ( Salesforce Support Reference)
I have in my code: ConnectApi.ChatterMessages.sendMessage('Hello World', '[portal user id]');

But it fails saying "Invalid user identifiers"

This is a community user.  Does that mean they can't receive direct chatter messages? This same piece of code works fine for internal users.
Hi, we've just tried to ask salesforce via a case why an Apex job is marked as aborted by User (when each User denies such knowledge) and they seem to think it's a developer request and pointed us here.

Case #11212305
Original request:
Hi, please can you let me know why the batch was "Aborted By User" as no one has aborted a job. Also can you state what the underlying error is - if there is one?
Apex Job Id: 7072000000vWcRV

Since this is an internal issue, I'm assuming the only folks who can help us the Salesforce employees who patrol these boards?

Thanks in advance.
 
Hi, I'm trying to do something really simple that already did in other times, i'm doing a link to an attachment from my site, for example:

http://mysiteurl/servlet/servlet.FileDownload?file=00PE000000ChmGbMAJ

And i get "An error has occurred while processing your request. We apologize for the inconvenience. Error ID: 834158013-11877 (63307295)"

I can't know what is happening, I have other attachments linked in the same way and they works fine. The parent's object is new, I'd already give access to the object in the site's profile (view all).

Please, I would like if someone from SFDC's support could tell me what is happening in the background. If I create a case, they will send me back to the forum.

Thanks a lot. 
Hi, I'm having an issue in Summer 14' organization that I had never seen. When I try to access a Visualforce Page like I usually do, I get a blank page.


For example, If I try:

https://virtualseller-6602.cloudforce.com/apex/testVF

I get:

https://virtualseller-6602--c.na17.visual.force.com/visualforce/recsession?sid=00Do0000000K6Rm!AXftXXXXXXXXJcxkUqKgCyAJeBmZzgMXTYBMp0KkIDAgbUtzLBRv2J18hTjc4qTS4RU2D9XtlyeOtUl1sT3Stb712h7h&inst=o&cshc=0000000O8H60000000K6Rm&retURL=https%3A%2F%2Fvirtualseller-6602--c.na17.visual.force.com%2Fapex%2FtestVF

And stops there.
It seems that something goes wrong with the session validation and I don't know why. It's happening with ALL the Visualforce Pages of the org.

Is anyone having the same problem/issue?
Thanks

I created a new Workflow Rule and attached a Outbound Message to it. This is for the Account Object. Now when I update the Account Object in Salesforce, it generates an Outbound message, however I see this error next to the Message ID in the Outbound Message Queue.
 
java.lang.reflect.InvocationTargetException
 
Any help would be much apprciated. Thanks in advance.

Message Edited by Kingsley on 02-26-2007 11:04 AM

  • February 22, 2007
  • Like
  • 0