• Moly Doly
  • NEWBIE
  • 30 Points
  • Member since 2022

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 8
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi;
I am hoping to get some help on this trigger. I am new to Apex programming. I have a custom object called Dues Calculator. For which I have a picklist depency, when the user selects one option "Unit Type" two additional picklist fields that need to be filled out are pre-populated with the correct options. Since I need to use those fields in formula. I created addtional fields that end in "selected". The purpose of my trigger is to automatically populate the "selected" fields with the options from the picklist depencies.
This is my trigger:
trigger NumberofUnitsPerTypeSelected on Dues_Calculator__c (before insert) {
    for(Dues_Calculator__c dues : Trigger.New){
        
       // Converting and Assigning the Picklist Value to the Selected Field to be used in a formula
        Decimal numberUnitTypeSelected   = Dues.Number_of_Units_Per_Type_Selected__c;
        String  numberUnitType           = Dues.Number__c;
        numberUnitType                     = numberUnitTypeSelected.format(); 
            
        // Converting and Assigning the Picklist Value to the Selected Field to be used in a formula
        Decimal percentageSelected       = Dues.Percentage_of_Ownership_Type_Selected__c;
        String  percentageOwnershipShare = Dues.Percentage_of_Ownership_Share__c;
        percentageOwnershipShare         = percentageSelected.format();
        
        insert dues;
        }
}

I get a Null Pointer Exception error, I tried to add the option to create a list. I am stuck here.

Any help is greatly appreciated;
Peter
Hi;
I am hoping to get some help on this trigger. I am new to Apex programming. I have a custom object called Dues Calculator. For which I have a picklist depency, when the user selects one option "Unit Type" two additional picklist fields that need to be filled out are pre-populated with the correct options. Since I need to use those fields in formula. I created addtional fields that end in "selected". The purpose of my trigger is to automatically populate the "selected" fields with the options from the picklist depencies.
This is my trigger:
trigger NumberofUnitsPerTypeSelected on Dues_Calculator__c (before insert) {
    for(Dues_Calculator__c dues : Trigger.New){
        
       // Converting and Assigning the Picklist Value to the Selected Field to be used in a formula
        Decimal numberUnitTypeSelected   = Dues.Number_of_Units_Per_Type_Selected__c;
        String  numberUnitType           = Dues.Number__c;
        numberUnitType                     = numberUnitTypeSelected.format(); 
            
        // Converting and Assigning the Picklist Value to the Selected Field to be used in a formula
        Decimal percentageSelected       = Dues.Percentage_of_Ownership_Type_Selected__c;
        String  percentageOwnershipShare = Dues.Percentage_of_Ownership_Share__c;
        percentageOwnershipShare         = percentageSelected.format();
        
        insert dues;
        }
}

I get a Null Pointer Exception error, I tried to add the option to create a list. I am stuck here.

Any help is greatly appreciated;
Peter
Hi, I am currently setting up Webchat to use on an external website. I have run through the chat deployment tasks and completed them as required. I have obtained the code snippet(s) to add to a webpage in order to show the chat window but nothing is displayed. I have checked the page source, everything looks as it should be. I have inspected the elements and can see the deployment id etc. The external website has been added to the CORS list. I'm not sure if I have missed a step. Thanks.

Below are 3 classes connected to each other. Help me to write a TEST CLASS.

public class IND_NeSLAgreementStatusRequest extends ParentAPIRequest{
public string Deal_No {get;set;}
public IND_NeSLAgreementStatusRequest(Applicant__c app,String loanAppId){

this.Deal_No = 'RJG01179D';//app.Opportunity__r.Parent_Deal_number__c;
validate(System.Label.NeSLAgreementStatus);
}

public override Map<String,String> getHttpRequestHeaders(){
Map<String,String> requestHeaderMap = Utilities.getHeaders();
return requestHeaderMap;
}

public override boolean validate(String serviceName){
if(this.Deal_No == null && String.isBlank(this.Deal_No)){
throw new IND_Exception(System.Label.deal_Number);
}
return true;
}
}


==========================

public class IND_NeSLAgreementStatusService {

public static IND_NeSLAgreementStatusRequest getNeSLAgreementStatusRequest(Applicant__c app,String loanAppId){
try{
IND_NeSLAgreementStatusRequest neSLAgreementStatusRequest = new IND_NeSLAgreementStatusRequest(app,loanAppId);//only validation and setting headers
return neSLAgreementStatusRequest;
}
catch(Exception ex){
ErrorLoggerUtil.logErrorEvent('IND_NeSLAgreementStatusRequest', 'getNeSLAgreementStatusRequest', System.Label.Apex, ex,loanAppId);
throw new IND_Exception(ex.getMessage());
}
}
}
=========================================================
public class IND_NeSLAgreementStatusResponse extends ParentAPIResponse {

public class Response {
public String status;
public String respDesc;
public List<Content> content;
}

public Response response;

public class Content {
public String Status_Code;
public String Status_Description;
public String Esign_Link;
}

}

Hi All,
For one of my opportunity record the browser is throwing Page Unresponsive error. Tried with chome, Mircrosoft Edge, mozilla firefox but throwing same error in all browsers.
Although, that functionality is working from mobile app but not from browser.
The page is getting unresponsive on the click of Approve button.
Any help will be really appreciated.
Thanks
User-added imageUser-added image
On widget selection I do not see share option on analytics dashboard,  how do I enable share button? 
Hi;
I am hoping to get some help on this trigger. I am new to Apex programming. I have a custom object called Dues Calculator. For which I have a picklist depency, when the user selects one option "Unit Type" two additional picklist fields that need to be filled out are pre-populated with the correct options. Since I need to use those fields in formula. I created addtional fields that end in "selected". The purpose of my trigger is to automatically populate the "selected" fields with the options from the picklist depencies.
This is my trigger:
trigger NumberofUnitsPerTypeSelected on Dues_Calculator__c (before insert) {
    for(Dues_Calculator__c dues : Trigger.New){
        
       // Converting and Assigning the Picklist Value to the Selected Field to be used in a formula
        Decimal numberUnitTypeSelected   = Dues.Number_of_Units_Per_Type_Selected__c;
        String  numberUnitType           = Dues.Number__c;
        numberUnitType                     = numberUnitTypeSelected.format(); 
            
        // Converting and Assigning the Picklist Value to the Selected Field to be used in a formula
        Decimal percentageSelected       = Dues.Percentage_of_Ownership_Type_Selected__c;
        String  percentageOwnershipShare = Dues.Percentage_of_Ownership_Share__c;
        percentageOwnershipShare         = percentageSelected.format();
        
        insert dues;
        }
}

I get a Null Pointer Exception error, I tried to add the option to create a list. I am stuck here.

Any help is greatly appreciated;
Peter
Is there a work around to incorporate more than 15 steps in an approval process. Our business process is quiet complicated and requires close to 25 steps to cater to the requirements.
  • March 08, 2010
  • Like
  • 3