-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
22Questions
-
18Replies
Object not available for other users in report but available for System admin
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.
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.
- Nalinaku
- August 20, 2020
- Like
- 0
- Continue reading or reply
Email limit exceeded on batch apex
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().
- Nalinaku
- July 31, 2020
- Like
- 0
- Continue reading or reply
Temporarily Disable Users updating forecasts
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
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
- Nalinaku
- July 30, 2020
- Like
- 0
- Continue reading or reply
While creating new forecasting type "Opportunities by Territory " I get error
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.
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.
- Nalinaku
- July 24, 2020
- Like
- 0
- Continue reading or reply
Srcup not defined on javascript button opening Visualforce page
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 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}');,
- Nalinaku
- July 22, 2020
- Like
- 0
- Continue reading or reply
Field update happening mysteriously in case object
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. ?
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. ?
- Nalinaku
- July 22, 2020
- Like
- 0
- Continue reading or reply
Send email alerts on time trigger workflow
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.
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.
- Nalinaku
- July 17, 2020
- Like
- 0
- Continue reading or reply
Code coverage is skipping lines in Developer console
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.
I checked the "oppfromRenewalBooked()" it has a return stmt at the end and not throwing any error. Please advise.
- Nalinaku
- July 01, 2020
- Like
- 0
- Continue reading or reply
Opportunity line item test class trigger error
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.
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: []
- Nalinaku
- June 30, 2020
- Like
- 0
- Continue reading or reply
Disable to button after first click for upto 4 hours
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.
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}"
- Nalinaku
- June 28, 2020
- Like
- 0
- Continue reading or reply
Overall org Code coverage %75 is mandatory going forward in PROD/SANDBOX ?
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.
Kindly let me know if you are aware of any such change is coming soon.
- Nalinaku
- June 18, 2020
- Like
- 0
- Continue reading or reply
How to get the Createddate, lastmodified date & description for the list of Sobjecttype.?
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.
Thanks a lot in advance.
- Nalinaku
- April 17, 2020
- Like
- 0
- Continue reading or reply
workflow email inconsistency in sandbox
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.
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.
- Nalinaku
- September 12, 2019
- Like
- 0
- Continue reading or reply
How to make input form Readonly based on User profile in Lightning Component?
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.
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.
- Nalinaku
- August 08, 2019
- Like
- 0
- Continue reading or reply
How to add popup in SF and collect 2 fields input from popup and save?
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.
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.
- Nalinaku
- July 23, 2019
- Like
- 0
- Continue reading or reply
Active Picklist value is not working-Erroring with Bad value
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.
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.
- Nalinaku
- July 06, 2019
- Like
- 0
- Continue reading or reply
How to add contacts related list in pagelayout again for different contact type?
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
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
- Nalinaku
- July 02, 2019
- Like
- 0
- Continue reading or reply
How to display message along with hyperlinked url in VF page
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.
Kindly let me know if I can achieve the hyperlinking only part of the message.
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.
- Nalinaku
- December 10, 2018
- Like
- 0
- Continue reading or reply
Send Account team to Siebel
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 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
- Nalinaku
- August 31, 2018
- Like
- 0
- Continue reading or reply
After Update Trigger on Account is not Working
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);
}
}
}
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);
}
}
}
- Nalinaku
- August 29, 2018
- Like
- 0
- Continue reading or reply
Object not available for other users in report but available for System admin
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.
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.
- Nalinaku
- August 20, 2020
- Like
- 0
- Continue reading or reply
Temporarily Disable Users updating forecasts
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
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
- Nalinaku
- July 30, 2020
- Like
- 0
- Continue reading or reply
Srcup not defined on javascript button opening Visualforce page
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 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}');,
- Nalinaku
- July 22, 2020
- Like
- 0
- Continue reading or reply
Field update happening mysteriously in case object
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. ?
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. ?
- Nalinaku
- July 22, 2020
- Like
- 0
- Continue reading or reply
Code coverage is skipping lines in Developer console
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.
I checked the "oppfromRenewalBooked()" it has a return stmt at the end and not throwing any error. Please advise.
- Nalinaku
- July 01, 2020
- Like
- 0
- Continue reading or reply
Opportunity line item test class trigger error
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.
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: []
- Nalinaku
- June 30, 2020
- Like
- 0
- Continue reading or reply
Overall org Code coverage %75 is mandatory going forward in PROD/SANDBOX ?
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.
Kindly let me know if you are aware of any such change is coming soon.
- Nalinaku
- June 18, 2020
- Like
- 0
- Continue reading or reply
How to get the Createddate, lastmodified date & description for the list of Sobjecttype.?
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.
Thanks a lot in advance.
- Nalinaku
- April 17, 2020
- Like
- 0
- Continue reading or reply
Active Picklist value is not working-Erroring with Bad value
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.
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.
- Nalinaku
- July 06, 2019
- Like
- 0
- Continue reading or reply
How to add contacts related list in pagelayout again for different contact type?
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
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
- Nalinaku
- July 02, 2019
- Like
- 0
- Continue reading or reply
How to display message along with hyperlinked url in VF page
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.
Kindly let me know if I can achieve the hyperlinking only part of the message.
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.
- Nalinaku
- December 10, 2018
- Like
- 0
- Continue reading or reply
After Update Trigger on Account is not Working
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);
}
}
}
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);
}
}
}
- Nalinaku
- August 29, 2018
- Like
- 0
- Continue reading or reply
How to add fields to VF pages without code change?
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.
Kindly suggest how can I approach this.
- Nalinaku
- April 24, 2018
- Like
- 0
- Continue reading or reply