• Nalinaku
  • NEWBIE
  • 20 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 22
    Questions
  • 18
    Replies
I am a System admin & I have a report type **Accounts with Service Contract and Contract lineitem** and I can add fields from the Contract line items to the report filter. 
But if the same report is viewed by some marketing user he/she cannot see Contract lineitem object itself but only Account & Service Contract fields. 
I checked the marketing user profile access for these standard objects and I see both Service Contract & Contract line items have Read access to this profile, but only Service contract is showing up not contract line items. 
Please advise. 

I have a batch job which sends email notification in bulk using Messaging.sendEmail() and its using setTargetObjectId to set the reciepient. It sends out thousands of emails but one day I got case saying emails are not received. Upon checking I see that there was an error "Email Limit Exceeded" for few emails. On that day it had sent some 19K emails successfully but for 9,000 + emails failed because of this error.
Please let me know if there is any limit to send email from batch class using Messaging.sendEmail().
I have a need to disable users from entering their forecasts during certain period of time in a week. For example, every monday from 9am to 11am.
How can this be scheduled ? 
I am thinking of turning off the Forecast tab in the Profile > Object Settings using apex, but not sure if this can be done. 
Please advise available options  
 
Hi, 
When I am trying to create a new forecasting type and select "Opportunities by Territory " I get below error in bottom of the page 
However this error is not coming for other forecasting type.  Kindly advise. 

Forecasting Error on creating new Forecast type
Hi, 
I have a on click javascript button on the case pagelayout which opens a visual force page and was working fine but suddenly user started getting error Url does not exists. but when I login as user and click on that button I see "srcUp is not defined" error. 

Here is the simple javascript on that button. 

srcUp('apex/CaseVFPage_v1?id={!Case.Id}');, 
I have custom field in case of datatype datetime, which is being used in one of the other custom formula field to count number of days from last updated. 
So everytime there is an update on the case, this field gets updated, but I am not able to figure out from where this field is getting updated?
 
I did search in apex class and trigger (searched using Enhanced code searcher chrome plugin)
I checked all workflows in Case object 
I checked all process builder flows(only 2 for case object)

Is there any place I missed where a field udpate can happen. ? 
I need to send email alerts when the Opportunity is still open and Closed date becomes current. And I have to keep sending email to owner ccing couple other, until opportunity is updated.
After 5 days ( after 5 reminders)  even if opportunity is still not actioned I have to start sending email reminders to owner marking managers in CC. 
There is no upper limit on how many reminders to send, if opportunity is not actioned, keep sending reminders. 
 
Here is the code coverage screenshot of my class and I see that after line 413, its not covering the code though there is nothing preventing it to abort from that line. 
I checked the "oppfromRenewalBooked()" it has a return stmt at the end and not throwing any error.  Please advise. 

Screenshot from Devloper console

 
Hi, 
I am running a test class on opportunity, which is inserting opportunity line items in couple of methods and everytime its trying to insert the Opp line item I get the below error from the trigger. 
It looks like Opp line item is getting inserted but trigger is failing them.

The line number which shows in the error is again the update/insert of opp line item which is failing. 

I checked the error Attempt to dereference null object, but I see new object is instatiated whereever dml is being performed. 

I checked the UserAssignHelper.checkLineItems at line 13 which is getting values from custom settings and I see values exists there. 

Please suggest. 
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, PSLR_OpportunityLineItem: execution of AfterInsert

caused by: System.DmlException: Update failed. First exception on row 0 with id 00k2i000003lJCDAA2; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, PSLR_OpportunityLineItem: execution of AfterUpdate

caused by: System.NullPointerException: Attempt to de-reference a null object

Class.UserAssignHelper.checkLineItems: line 13, column 1
Class.PSLR_OpportunityLineItemHandler.updateOppOwnerBasedOnLineItemPricingType: line 122, column 1
Trigger.PSLR_OpportunityLineItem: line 50, column 1: []

Class.PSLR_OpportunityLineItemHandler.NoOfLineItem: line 28, column 1
Trigger.PSLR_OpportunityLineItem: line 42, column 1: []

 
I have a button which executes the Javascript on the case objects. Basically what it does is it escalates the case. But the problem is user can click it repeatedly and cause lot of cases/alerts generated. 
We want to limit user to wait for atleast 4 hours after the first click. Here is the javascript behind this button. How can I add a counter of 4 hours to this. 
 
{!REQUIRESCRIPT('/soap/ajax/26.0/connection.js')}
{!REQUIRESCRIPT('/js/functions.js')}
{!REQUIRESCRIPT('resource/JQueryNew/jQuery/jquery-1.8.2.min.js')}
{!REQUIRESCRIPT('resource/JQueryNew/jQuery/ui/jquery-ui-1.9.1.custom.min.js')}
{!REQUIRESCRIPT('resource/JQueryNew/jQuery/postmessage/jquery.ba-postmessage.js')}
{!REQUIRESCRIPT('resource/JQueryNew/jQuery/bbq/jquery.ba-bbq.min.js')}
requireCssFile('resource/JQueryNew/jQuery/ui/css/ui-lightness/jquery-ui-1.9.1.custom.min.css');
function requireCssFile(filename)
{
var fileref = document.createElement('link');
fileref.setAttribute('rel', 'stylesheet');
fileref.setAttribute('type', 'text/css');
fileref.setAttribute('href', filename);
document.getElementsByTagName('head')[0].appendChild(fileref);
}
var j$ = jQuery.noConflict();
var iframe_url = '{!URLFOR("apex/CustomerEsc?id=")}{!Case.Id}';
var child_domain = iframe_url.substring(0, iframe_url.indexOf('/', 9));
var parent_domain = window.location.protocol + '//' + window.location.host;
var j$modalDialog = j$('<div id="opppopup"></div>')
.html('<iframe id="iframeContentId" src="' + iframe_url + '" frameborder="0" height="100%" width="100%" marginheight="0" marginwidth="0" scrolling="yes" />')
.dialog({
autoOpen: false,
title: 'Escalate Case',
resizable: true,
width: 850,
height: 605,
autoResize: true,
modal: true,
draggable: true
});

j$modalDialog.dialog('open');

//window.location.href="apex/CustomerEsc?id={!Case.Id}"

 
I heard that overall org Code coverage %75 is mandatory going forward in Prod/Sandbox coming August release, but I dont see any such news in salesforce summer release 2020. 
Kindly let me know if you are aware of any such change is coming soon. 
I have a list of Sobjects and I want to get the Createddate, lastmodified date & description of each Sobject using Apex. Also if I can check if that Sobject was created as part of Managed package or not. Kindly advise. 

Thanks a lot in advance. 
In one of our sandbx, we are testing some funcationality which sends email from workflow whenever a case with specific subject is created. But the problem is email sending is very inconsistent i.e. if i case 4 cases with desired subject I get only 1 or 2 emails. 

Also I tested by adding my other teammates to the recipients and strangely not all of them are getting email but for every case only 1 or 2 reciepient is getting email.
for ex: If I get email for Case1 my teammate wouldnt get and viceversa for case2. 

Thanks in advace for you ideas and suggestions. 
I have an Action button in our lightning Page, upon clicking it shows a form to input couple of fields and save it. But I have to make those input fields readonly for Profile 1 and editable for Profile 2.
Let me know how I can achieve this. If possible within Lightning component itself by checking profile of the current user, As I am already calling server side script upon clicking this button in doinit and form based on the return values. 
Is it possible that i get 2 return values from apex and one of them will be to read the profile and make the input fields readonly. 
Thanks.
Hi All, 
I have a requirement to show popups and collect couple of field information in the pop up and save to a custom object in pop up window only. This pop up has to appear in SF1 app as well. Kindly suggest.

Thanks in advance. 
 
Hi Friends, 
I have a strange problem in our org that one of the active picklist value is not working. 
There is a  field called Nationality__c in contact, and updates are being receved from integration api. 
for example : If I get contact updates in which Nationality is "Turkey", contact gets updated correctly without any error. 
But with the same contact update api, whenever I get updates for "Libya", I get "bad value for Restricted picklist field" with status code=INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST. 

When I check the picklist values of this field, both of these values are Active, not getting any idea why its failing for Libya but not for Turkey. 
FYI, this picklist values are created from Global value set. 
Hi friends, 
In the existing page layout, I already have a Contact related list. Now i have a requirement to create shareholders which can also be accomodated in Contacts and display the same below the contacts related list. 
How can I add another Contacts related list in pagelayout and show only Shareholders type in that. 

Thanks in advance, kindly suggest. 

Thanks
Hi All, 
I have a requirement to display a message on checking a checkbox, which contains an URL in the end, which needs to be hyperlinked. I am able to display the message with the custom label now, which is not hyperlinked, below is the code sample. I have to make only the URL part hyperlinked clicking on which should follow and open the url page. 
 
<apex:page standardController="Contact">
<apex:form >

<apex:pageBlock id="theBlock">
<apex:pageBlockSection columns="1">
                    <apex:inputField label="checkboxfield" value="{!Contact.CheckboxValue }">
                        <apex:actionSupport event="onchange" reRender="theBlock" status="status"/>
                    </apex:inputField>

 
  <apex:OutputText value="{!$Label.Mylabelmessage}" rendered="{!(Contact.checkboxfield == true)}"/> 
  </apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

Kindly let me know if I can achieve the hyperlinking only part of the message. 
Hi Folks, 
I have requirment to send an outbound message everytime a new Account team is added. Unfortunately I cannot write trigger on Account team and dont have this object in Workflows or Process builder. 
Kindly Advise on how to achieve this. It should be automatic, i.e. everytime a new Account team member is created send an outbound message for this team member. 

Thanks
Navinku
I have a problem with Account trigger afterupdate event. Below are the problem details. 

Expectation is: Whenever I update a Status column in Account, there is a method in AfterInsertUpdate in trigger which updates the status of custom objects related to Account(child objects)

Problem is : Whenever I update the Status column in Account, trigger fires and executes upto BeforeUpdate event and executes all the methods which are being called in Beforeupdate event. But after this I see in Debug log that some validation fires and after that again BeforeUpdate event starts and I see that oldmap no longer hold the status to which I updated the Account. i.e. oldmap and new values are same, which results in my condition in IF statement not meeting and hence update is not happening. 

Actions Taken: 
1. 
I commented the all the methods step by step being called in Before update and checked the logs but no luck. 
2. I Inactivated all update workflows related to Account and checked but no luck again

Thanks in Advance for your help. 

Trigger:
trigger IS_AccountTrigger on Account (after insert, after update, before insert, before update, before delete, after delete) {
    system.debug('reached insisde trigger');
    ISecG_Trigger_Settings__c objTriggerSetting = ISecG_Trigger_Settings__c.getInstance();
   
    
   if(objTriggerSetting.Enable_Account_Trigger__c) {
        if(Trigger.isAfter && (Trigger.isInsert || Trigger.isUpdate)) {
            system.debug('reached inside after trigger');
            IS_AccountTriggerHandler.afterInsertUpdate();     \\MY METHOD IS BEING CALLED FROM HERE
             if(trigger.isInsert){             
            <CustomClass.CustomMethod>(Trigger.new,Trigger.oldmap); 
             }
        }
        if(Trigger.isBefore && (Trigger.isInsert || Trigger.isUpdate)) {
            system.debug('reached insisde before trigger@@@@@');
            IS_AccountTriggerHandler.beforeInsertUpdate();
         }
        if(trigger.isInsert && trigger.isBefore) {
            IS_AccountTriggerHandler.beforeInsert();
        }
        if(trigger.isBefore && trigger.isUpdate) {
            IS_AccountTriggerHandler.beforeUpdate();
         }
        if(Trigger.isBefore && Trigger.isDelete) {
            IS_AccountTriggerHandler.beforeDelete();
            <CustomClass.CustomMethod>(Trigger.old); 
      }
        if(Trigger.isAfter && Trigger.isDelete) {
            IS_AccountTriggerHandler.afterDelete(Trigger.old);
           }
        }
   }
I am a System admin & I have a report type **Accounts with Service Contract and Contract lineitem** and I can add fields from the Contract line items to the report filter. 
But if the same report is viewed by some marketing user he/she cannot see Contract lineitem object itself but only Account & Service Contract fields. 
I checked the marketing user profile access for these standard objects and I see both Service Contract & Contract line items have Read access to this profile, but only Service contract is showing up not contract line items. 
Please advise. 
I have a need to disable users from entering their forecasts during certain period of time in a week. For example, every monday from 9am to 11am.
How can this be scheduled ? 
I am thinking of turning off the Forecast tab in the Profile > Object Settings using apex, but not sure if this can be done. 
Please advise available options  
 
Hi, 
I have a on click javascript button on the case pagelayout which opens a visual force page and was working fine but suddenly user started getting error Url does not exists. but when I login as user and click on that button I see "srcUp is not defined" error. 

Here is the simple javascript on that button. 

srcUp('apex/CaseVFPage_v1?id={!Case.Id}');, 
I have custom field in case of datatype datetime, which is being used in one of the other custom formula field to count number of days from last updated. 
So everytime there is an update on the case, this field gets updated, but I am not able to figure out from where this field is getting updated?
 
I did search in apex class and trigger (searched using Enhanced code searcher chrome plugin)
I checked all workflows in Case object 
I checked all process builder flows(only 2 for case object)

Is there any place I missed where a field udpate can happen. ? 
Here is the code coverage screenshot of my class and I see that after line 413, its not covering the code though there is nothing preventing it to abort from that line. 
I checked the "oppfromRenewalBooked()" it has a return stmt at the end and not throwing any error.  Please advise. 

Screenshot from Devloper console

 
Hi, 
I am running a test class on opportunity, which is inserting opportunity line items in couple of methods and everytime its trying to insert the Opp line item I get the below error from the trigger. 
It looks like Opp line item is getting inserted but trigger is failing them.

The line number which shows in the error is again the update/insert of opp line item which is failing. 

I checked the error Attempt to dereference null object, but I see new object is instatiated whereever dml is being performed. 

I checked the UserAssignHelper.checkLineItems at line 13 which is getting values from custom settings and I see values exists there. 

Please suggest. 
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, PSLR_OpportunityLineItem: execution of AfterInsert

caused by: System.DmlException: Update failed. First exception on row 0 with id 00k2i000003lJCDAA2; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, PSLR_OpportunityLineItem: execution of AfterUpdate

caused by: System.NullPointerException: Attempt to de-reference a null object

Class.UserAssignHelper.checkLineItems: line 13, column 1
Class.PSLR_OpportunityLineItemHandler.updateOppOwnerBasedOnLineItemPricingType: line 122, column 1
Trigger.PSLR_OpportunityLineItem: line 50, column 1: []

Class.PSLR_OpportunityLineItemHandler.NoOfLineItem: line 28, column 1
Trigger.PSLR_OpportunityLineItem: line 42, column 1: []

 
I heard that overall org Code coverage %75 is mandatory going forward in Prod/Sandbox coming August release, but I dont see any such news in salesforce summer release 2020. 
Kindly let me know if you are aware of any such change is coming soon. 
I have a list of Sobjects and I want to get the Createddate, lastmodified date & description of each Sobject using Apex. Also if I can check if that Sobject was created as part of Managed package or not. Kindly advise. 

Thanks a lot in advance. 
Hi Friends, 
I have a strange problem in our org that one of the active picklist value is not working. 
There is a  field called Nationality__c in contact, and updates are being receved from integration api. 
for example : If I get contact updates in which Nationality is "Turkey", contact gets updated correctly without any error. 
But with the same contact update api, whenever I get updates for "Libya", I get "bad value for Restricted picklist field" with status code=INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST. 

When I check the picklist values of this field, both of these values are Active, not getting any idea why its failing for Libya but not for Turkey. 
FYI, this picklist values are created from Global value set. 
Hi friends, 
In the existing page layout, I already have a Contact related list. Now i have a requirement to create shareholders which can also be accomodated in Contacts and display the same below the contacts related list. 
How can I add another Contacts related list in pagelayout and show only Shareholders type in that. 

Thanks in advance, kindly suggest. 

Thanks
Hi All, 
I have a requirement to display a message on checking a checkbox, which contains an URL in the end, which needs to be hyperlinked. I am able to display the message with the custom label now, which is not hyperlinked, below is the code sample. I have to make only the URL part hyperlinked clicking on which should follow and open the url page. 
 
<apex:page standardController="Contact">
<apex:form >

<apex:pageBlock id="theBlock">
<apex:pageBlockSection columns="1">
                    <apex:inputField label="checkboxfield" value="{!Contact.CheckboxValue }">
                        <apex:actionSupport event="onchange" reRender="theBlock" status="status"/>
                    </apex:inputField>

 
  <apex:OutputText value="{!$Label.Mylabelmessage}" rendered="{!(Contact.checkboxfield == true)}"/> 
  </apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

Kindly let me know if I can achieve the hyperlinking only part of the message. 
I have a problem with Account trigger afterupdate event. Below are the problem details. 

Expectation is: Whenever I update a Status column in Account, there is a method in AfterInsertUpdate in trigger which updates the status of custom objects related to Account(child objects)

Problem is : Whenever I update the Status column in Account, trigger fires and executes upto BeforeUpdate event and executes all the methods which are being called in Beforeupdate event. But after this I see in Debug log that some validation fires and after that again BeforeUpdate event starts and I see that oldmap no longer hold the status to which I updated the Account. i.e. oldmap and new values are same, which results in my condition in IF statement not meeting and hence update is not happening. 

Actions Taken: 
1. 
I commented the all the methods step by step being called in Before update and checked the logs but no luck. 
2. I Inactivated all update workflows related to Account and checked but no luck again

Thanks in Advance for your help. 

Trigger:
trigger IS_AccountTrigger on Account (after insert, after update, before insert, before update, before delete, after delete) {
    system.debug('reached insisde trigger');
    ISecG_Trigger_Settings__c objTriggerSetting = ISecG_Trigger_Settings__c.getInstance();
   
    
   if(objTriggerSetting.Enable_Account_Trigger__c) {
        if(Trigger.isAfter && (Trigger.isInsert || Trigger.isUpdate)) {
            system.debug('reached inside after trigger');
            IS_AccountTriggerHandler.afterInsertUpdate();     \\MY METHOD IS BEING CALLED FROM HERE
             if(trigger.isInsert){             
            <CustomClass.CustomMethod>(Trigger.new,Trigger.oldmap); 
             }
        }
        if(Trigger.isBefore && (Trigger.isInsert || Trigger.isUpdate)) {
            system.debug('reached insisde before trigger@@@@@');
            IS_AccountTriggerHandler.beforeInsertUpdate();
         }
        if(trigger.isInsert && trigger.isBefore) {
            IS_AccountTriggerHandler.beforeInsert();
        }
        if(trigger.isBefore && trigger.isUpdate) {
            IS_AccountTriggerHandler.beforeUpdate();
         }
        if(Trigger.isBefore && Trigger.isDelete) {
            IS_AccountTriggerHandler.beforeDelete();
            <CustomClass.CustomMethod>(Trigger.old); 
      }
        if(Trigger.isAfter && Trigger.isDelete) {
            IS_AccountTriggerHandler.afterDelete(Trigger.old);
           }
        }
   }
The scenario is there is already a VF page with apex code which is retrieving some set of fields. Now I need to add 10 more columns to both VF page and APEX code without modifying the code. 
Kindly suggest how can I approach this.