-
ChatterFeed
-
5Best Answers
-
1Likes Received
-
0Likes Given
-
15Questions
-
83Replies
I have written the trigger , facing the error
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){} }
-
- VSK98
- April 15, 2016
- Like
- 0
- Continue reading or reply
Error: Unknown Property
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%">
</td>
<td align="right" width="25%">
<apex:commandLink id="Stage1n" value="Stage 1 - Identify Target" onComplete="stage1Status();" />
</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%">
</td>
<td align="right" width="25%">
<apex:commandLink id="Stage2n" value="Stage 2 - Qualify Target" onComplete="stage2Status();" />
</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">
<br/>
<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%">
</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;
}
}
-
- JN22
- June 03, 2013
- Like
- 0
- Continue reading or reply
Variable does not exist? I just declared it!
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; }
-
- jaw999
- February 22, 2013
- Like
- 0
- Continue reading or reply
Need Info about API Usage
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
-
- Juan Spagnoli
- April 15, 2016
- Like
- 0
- Continue reading or reply
Skinny Table Needed
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
-
- Juan Spagnoli
- August 26, 2015
- Like
- 0
- Continue reading or reply
Issue with Apex Class Coverage
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.
-
- Juan Spagnoli
- March 31, 2015
- Like
- 0
- Continue reading or reply
Help needed to know what query is giving timeout
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!
-
- Juan Spagnoli
- December 16, 2014
- Like
- 0
- Continue reading or reply
Trying to access to attachment get: Error ID: 834158013-11877 (63307295)
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.
-
- Juan Spagnoli
- October 21, 2014
- Like
- 0
- Continue reading or reply
Issue trying to access to a VF Page in Summer 14
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
-
- Juan Spagnoli
- July 15, 2014
- Like
- 0
- Continue reading or reply
Salesforce's error when I'm trying to upload a package's version
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
-
- Juan Spagnoli
- May 21, 2014
- Like
- 0
- Continue reading or reply
Issue with apex editor in Summer 13 and Chrome
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.
-
- Juan Spagnoli
- May 13, 2013
- Like
- 1
- Continue reading or reply
Convert from Decimal latitude/longitude to Degrees
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
-
- Juan Spagnoli
- February 22, 2013
- Like
- 0
- Continue reading or reply
Schema Describe FieldSets is not working!
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.
-
- Juan Spagnoli
- February 06, 2013
- Like
- 0
- Continue reading or reply
Batchable instance is too big
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!
-
- Juan Spagnoli
- October 31, 2012
- Like
- 0
- Continue reading or reply
System.CalloutException without any DML operation
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!
-
- Juan Spagnoli
- April 10, 2012
- Like
- 0
- Continue reading or reply
Apex REST API release?
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!!!
-
- Juan Spagnoli
- April 04, 2012
- Like
- 0
- Continue reading or reply
REST API - Cases PATCH trigger Assignment Rules
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!
-
- Juan Spagnoli
- March 23, 2012
- Like
- 0
- Continue reading or reply
System Log Console - Where did the download button go???
I'm with the new system log console and I can't find how to download a log... Any clue? : /
Thx.
-
- Juan Spagnoli
- January 31, 2012
- Like
- 0
- Continue reading or reply
Issue with apex editor in Summer 13 and Chrome
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.
-
- Juan Spagnoli
- May 13, 2013
- Like
- 1
- Continue reading or reply
Lighting aura:event not firing, or handler not executing
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
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); } })
- Diamundo
- October 31, 2016
- Like
- 2
- Continue reading or reply
I have written the trigger , facing the error
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){} }
- VSK98
- April 15, 2016
- Like
- 0
- Continue reading or reply
Skinny Table Needed
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
- Juan Spagnoli
- August 26, 2015
- Like
- 0
- Continue reading or reply
Issue with Apex Class Coverage
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.
- Juan Spagnoli
- March 31, 2015
- Like
- 0
- Continue reading or reply
Help needed to know what query is giving timeout
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!
- Juan Spagnoli
- December 16, 2014
- Like
- 0
- Continue reading or reply
Package Upload Failed
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)
- Mansa Systems 5
- December 16, 2014
- Like
- 0
- Continue reading or reply
"Invalid user identifiers" when sending chatter message to portal user from apex
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.
- MoDiggity
- November 20, 2014
- Like
- 1
- Continue reading or reply
Apex Job Aborted By User
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.
- cml.sls
- November 12, 2014
- Like
- 1
- Continue reading or reply
Trying to access to attachment get: Error ID: 834158013-11877 (63307295)
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.
- Juan Spagnoli
- October 21, 2014
- Like
- 0
- Continue reading or reply
Issue trying to access to a VF Page in Summer 14
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
- Juan Spagnoli
- July 15, 2014
- Like
- 0
- Continue reading or reply
help resolving java.lang. reflect.InvocationTargetException
Message Edited by Kingsley on 02-26-2007 11:04 AM
- sf_dev
- February 22, 2007
- Like
- 0
- Continue reading or reply