• yash mehta 12
  • NEWBIE
  • 44 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 18
    Replies

I am creating a report and I have field Name Inspection status and its picklist value approved and denied and I have summarized the report.

so for example, the Approved record is 10 and denied a record is 20 so the grand total is 30

So I have to make a formula that says that Approved / Grand Total that means 10/30 in percentage.

Can anyone send me formula with a screenshot?

Challenge Not yet complete... here's what's wrong: 
Could not find a custom field on the Account object with the API Name 'Support_Plan_Start_Date__c'.User-added image
trigger majorIdonApplication on Application__c (before insert,before update) {
    Set<String>majorName = new Set<string>();
    Set<Id>majorNameset = new Set<Id>();
    for(Application__c application : Trigger.new){
        if(application.Intended_Major__c !=null){
            majorName.add(application.Intended_Major__c);
        }
    }
    for(Major__c major : [SELECT id,Name FROM Major__c WHERE name In : majorName]){
        majorNameset.add(major.Id);
    }
    for(Application__c app : Trigger.new){
        for(Id Child : majorNameset){
            app.Major_Interest__c = Child;
        }
    }
}

trigger cc_contactUpdateOnApplication on Application__c (after update) {
    Map<id,id> applicationMap = new Map<id,id>();
    List<contact>conList = new List<contact>();
    for(Application__c application : [SELECT id,Name,Contact__c,CC_Term__c,Admissions_Status__c FROM Application__c Order By LastModifiedDate DESC Limit 1]){
        system.debug('@@@@@application'+application);
        if(application.Admissions_Status__c != Trigger.oldMap.get(application.Id).Admissions_Status__c){
            // if(application.Admissions_Status__c !=null){
            applicationMap.put(application.Contact__c, application.Id);
            system.debug('#####applicationMap'+applicationMap);
        }
    } 
    for(contact con :[SELECT id,Name,Active_Application_CC__c FROM contact WHERE Id IN :applicationMap.keySet()] ){
        con.Active_Application_CC__c = applicationMap.get(con.Id);
        conList.add(con);
        system.debug('$$$$conList'+conList);
    }
    if(conList.size() >0){
        update conList;
        system.debug('####conList'+conList);
    }
}
From the below image if i select picklist as other than only new field should pop up on vf page so how to do that?
User-added image
Can you please write step and if possible can you please attached screenshot?

How to do Email alert when Opportunities have not been modified in the last 30 days?

How to do with workflow or Process builder?

Can Anyone write the steps?

for Opportunity Products that are related to an Opportunity Type of Contract Renewal or Contract Renewal-Modules, we don't want users to be able to save the product if the Amount ARR Renewed field is blank.
Quotes and Quote Line Items to store current product status? 
Investigate which object to use to for storing an product's status after being purchased as an Opportunity Product
Option 1 - use final/accepted version of Quote and its Quote Line Items
We would need a way to filter out or exclude those Quote Line Items from Quotes that were not accepted as the final purchased item
Orders & Order Products seem to be not what we're looking for, too complex for this situation
Possible to create a custom button on the Contact page layout for "Create Lead"?
Create Lead button should open a new lead creation menu and also copy over some key fields from the Contact like Account, Name, Title, Phone, Email, etc.

Opportunity Forecasting functionality
Outline differences between the two forecasting versions - which one is most applicable for our organization?
Is it possible to customize the available values in the Forecast Category picklist? (default values: omitted, pipeline, best case, commit, closed)
Forecast Categories are tied by default to the Opportunity Stage. Is it possible to have this field be manually updated?
public class LightningActivityHistory{
    Id sObjectname= ApexPages.currentPage().getParameters().get('Id');
    
    public list<Task> tasklist{get;set;}
    public list<Task>LeadTask{get;set;}
    public Id LeadId{get;set;}
    public LightningActivityHistory(){
        
        if(sObjectname !=null )
            tasklist= [select id,Status,ActivityDate,Subject,Who.Name,What.Name,Description,LastModifiedDate,Owner.Name,Type FROM Task WHERE WhatID=:sObjectname OR whoId=:sObjectname ORDER BY ActivityDate DESC];
        for(Lead led :[SELECT id,Name,(select id,Status,ActivityDate,Subject,Who.Name,What.Name,Description,LastModifiedDate,Owner.Name,Type FROM Tasks) FROM Lead WHERE Account__c =: sobjectname]){
            LeadId = led.id;
        }
        
        LeadTask =[select id,Status,ActivityDate,Subject,Who.Name,What.Name,Description,LastModifiedDate,Owner.Name,Type FROM Task WHERE whoId=:LeadId ORDER BY ActivityDate DESC];
        
    }
    public PageReference cancel() {
        PageReference ldPage = new PageReference('/'+sObjectname);
        ldPage.setRedirect(true);
        return ldPage;
    }
}
if Task Type = Call and Call Type field is empty
OR if Task Type = Event and Demo Type field is empty

I made it like this
CallType  =  ISBLANK(expression) ||  Demo_Type__c  =  ISBLANK(expression)

User-added image
I used this step

From Setup, enter Outbound Changesets in the Quick Find box, then select Outbound Changesets.
If a splash page appears, click Continue.
In the Change Sets list, click New.
Enter a name for your change set, for example, HelloWorldChangeSet, and optionally a description. Click Save.
In the Change Set Components section, click Add.
Select Apex Class from the component type drop-down list, then select the MyHelloWorld and the HelloWorldTestClass classes from the list and click Add to Change Set.
Click View/Add Dependencies to add the dependent components.
Select the top checkbox to select all components. Click Add To Change Set.
In the Change Set Detail section of the change set page, click Upload.
Select the target organization, in this case production, and click Upload.
After the change set upload completes, deploy it in your production organization.
Log into your production organization.
From Setup, enter Inbound Change Sets in the Quick Find box, then select Inbound Change Sets.
If a splash page appears, click Continue.
In the change sets awaiting deployment list, click your change set's name.
Click Deploy.

Challenge Not yet complete... here's what's wrong: 
Could not find a custom field on the Account object with the API Name 'Support_Plan_Start_Date__c'.User-added image
Hi,
I am still stuck on this FSL module with the error messagescreenshot Could not find a completed Service Appointment with the Description of 'Drill'.
Please can someone help me get to the bottom of this as I now have to complete this module as pre-reqs for FSL training next week.
Thank you
Matt
Challenge Not yet complete... here's what's wrong: 
Could not find a custom field on the Account object with the API Name 'Support_Plan_Start_Date__c'.User-added image
Can you please write step and if possible can you please attached screenshot?
for Opportunity Products that are related to an Opportunity Type of Contract Renewal or Contract Renewal-Modules, we don't want users to be able to save the product if the Amount ARR Renewed field is blank.
Possible to create a custom button on the Contact page layout for "Create Lead"?
Create Lead button should open a new lead creation menu and also copy over some key fields from the Contact like Account, Name, Title, Phone, Email, etc.
public class LightningActivityHistory{
    Id sObjectname= ApexPages.currentPage().getParameters().get('Id');
    
    public list<Task> tasklist{get;set;}
    public list<Task>LeadTask{get;set;}
    public Id LeadId{get;set;}
    public LightningActivityHistory(){
        
        if(sObjectname !=null )
            tasklist= [select id,Status,ActivityDate,Subject,Who.Name,What.Name,Description,LastModifiedDate,Owner.Name,Type FROM Task WHERE WhatID=:sObjectname OR whoId=:sObjectname ORDER BY ActivityDate DESC];
        for(Lead led :[SELECT id,Name,(select id,Status,ActivityDate,Subject,Who.Name,What.Name,Description,LastModifiedDate,Owner.Name,Type FROM Tasks) FROM Lead WHERE Account__c =: sobjectname]){
            LeadId = led.id;
        }
        
        LeadTask =[select id,Status,ActivityDate,Subject,Who.Name,What.Name,Description,LastModifiedDate,Owner.Name,Type FROM Task WHERE whoId=:LeadId ORDER BY ActivityDate DESC];
        
    }
    public PageReference cancel() {
        PageReference ldPage = new PageReference('/'+sObjectname);
        ldPage.setRedirect(true);
        return ldPage;
    }
}
if Task Type = Call and Call Type field is empty
OR if Task Type = Event and Demo Type field is empty

I made it like this
CallType  =  ISBLANK(expression) ||  Demo_Type__c  =  ISBLANK(expression)

User-added image
I used this step

From Setup, enter Outbound Changesets in the Quick Find box, then select Outbound Changesets.
If a splash page appears, click Continue.
In the Change Sets list, click New.
Enter a name for your change set, for example, HelloWorldChangeSet, and optionally a description. Click Save.
In the Change Set Components section, click Add.
Select Apex Class from the component type drop-down list, then select the MyHelloWorld and the HelloWorldTestClass classes from the list and click Add to Change Set.
Click View/Add Dependencies to add the dependent components.
Select the top checkbox to select all components. Click Add To Change Set.
In the Change Set Detail section of the change set page, click Upload.
Select the target organization, in this case production, and click Upload.
After the change set upload completes, deploy it in your production organization.
Log into your production organization.
From Setup, enter Inbound Change Sets in the Quick Find box, then select Inbound Change Sets.
If a splash page appears, click Continue.
In the change sets awaiting deployment list, click your change set's name.
Click Deploy.

Hi All,
I'm new to salesforce and started working on Trailhead's. I facing issue with the Trigger Challenge. Here is the triger code im writing 

trigger AccountAddressTrigger on Account (before insert) {
    for(Account a : Trigger.new){
        if(a.Match_Billing_Address__c && a.BillingPostalCode != null){
            a.ShippingPostalCode = a.BillingPostalCode;
        }
    }
    
}

but i'm getting the following error. Not sure where i'm doing wrong. can someone please help me here. Thanks in advance.

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, TestTrigger: execution of AfterInsert caused by: System.NullPointerException: Attempt to de-reference a null object Trigger.TestTrigger: line 3, column 1: []