• RichardR1
  • NEWBIE
  • 140 Points
  • Member since 2019
  • Salesforce Admin trying to learn to code

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 42
    Questions
  • 30
    Replies
I have a list of custom object (Meeting Note)and I want to be able to edit a custom field (Firm Type) from another object (Net Prospect Score) that is indirectly related to the Meeting Note object. They both have a lookup field to Contact object. Below is my attempt at an Apex class that does not work. I was able to only display the custom field but the update method does not work.
public class MeetingNoteCtrlr{

    public List<MeetingNote__c> meetingNotesOutstanding {get; set;}
    public MeetingNoteMDHomePageCtrlr() {

        meetingNotesOutstanding = [
            SELECT FIELDS(STANDARD), Name__r.Net_Prospect_Score__r.Firm_Type__c
            FROM MeetingNote__c
            ORDER BY Meeting_Date__c DESC
            LIMIT 100];
    }
    
    public PageReference saveMeetingNotes() {

        try{
           update meetingNotesOutstanding;
        }
        catch(DmlException ex){
            ApexPages.addMessages(ex);
        }
        return null;
    }      
}

 
It does not look like I have an option to access apex classes from my Org using Visual Studio Code.
Hello everyone, I created a custom list of Event records using a custom controller and Visualforce page. In the list the user can edit an Event but after saving the change, it also changes the last modified date of the other records on the list, even though there was no change to the data. What can I do so that Salesforce will only update the record that was changed?
Below is my current custom controller:
public class EventsMDHomePage{

    public List<Event> eventsToday {get; set;}

    public EventsMDHomePage() {
        eventsToday = [
            SELECT FIELDS(STANDARD)
            FROM Event
            WHERE OwnerId =: UserInfo.getUserId() AND ActivityDate =: date.today()
            ORDER BY StartDateTime ASC
            LIMIT 1000];
    }
    
    public PageReference saveEvents() {
        try{
            update eventsToday;
        }
        catch(DmlException ex){
            ApexPages.addMessages(ex);
        }
        return null;
    }      
}
Hi guys, for some reason my test class says Pass in the Developer Console but code coverage is 0% at the same time. How can it pass the test if there is 0%? I only used a test class generator because I'm not good at creating test classess yet.

Here is my custom controller:
public class ContactTasks{
    public Event event;
    public ContactTasks() {
        event = [SELECT FIELDS(STANDARD) FROM Event WHERE Id = :ApexPages.currentPage().getParameters().get('id')];
    }
    public Event getEvent(){
        return event;
    }
    List <Task> relatedTasks;
        public List<Task> getrelatedTasks(){
        relatedTasks = [SELECT FIELDS(STANDARD)
                FROM Task
                WHERE WhoId= :this.event.WhoId
                ORDER BY ActivityDate DESC];
        return relatedTasks;
    }

    
}
Here is my test class:
@isTest
private class ContactTasks_Test{
  @testSetup
  static void setupTestData(){
    test.startTest();
    Contact contact_Obj = new Contact(LastName='Test');
    Insert contact_Obj;
    Event eventobj = new Event(WhoId = contact_Obj.id, DurationInMinutes = 10, ActivityDateTime = Datetime.now());
    Insert eventobj;
    Task task_Obj = new Task(WhoId = contact_Obj.id, ActivityDate = Date.today(), Status = 'Not Started', Priority = 'High', Description = '12', IsReminderSet = false, IsRecurrence = false, Placeholder_for_next_call_set__c = false, BD_Meeting_scheduled_by_InMail__c = false, Duplicate_Meeting__c = false, Automatic_Reply__c = false, Candidate_InMail__c = false, Bounced__c = false);
    Insert task_Obj; 
    test.stopTest();
  }
  static testMethod void test_getEvent_UseCase1(){
    List<Task> task_Obj  =  [SELECT Id,WhoId,WhatId,WhoCount,WhatCount,Subject,ActivityDate,Status,Priority,Description,IsRecurrence,Placeholder_for_next_call_set__c from Task];
    System.assertEquals(true,task_Obj.size()>0);
    PageReference pageRef = Page.ContactsTasks;
    pageRef.getParameters().put('id','test');
    Test.setCurrentPage(pageRef);
    Contact contact_Obj = new Contact(LastName='Test');
    Insert contact_Obj;
    Event eventobj = new Event(WhoId = contact_Obj.id, DurationInMinutes = 10, ActivityDateTime = Datetime.now());
    Insert eventobj;

  }

    static testMethod void test_getEvent_UseCase3(){
    List<Task> task_Obj  =  [SELECT Id,WhoId,WhatId,WhoCount,WhatCount,Subject,ActivityDate,Status,Priority,Description,IsRecurrence,Placeholder_for_next_call_set__c from Task];
    System.assertEquals(true,task_Obj.size()>0);
    PageReference pageRef = Page.ContactsTasks;
    pageRef.getParameters().put('id','test');
    Test.setCurrentPage(pageRef);


    task_Obj[0].ActivityDate = date.parse('7/13/2022');
    task_Obj[0].Status='Not Started';
    task_Obj[0].Priority='High';
    task_Obj[0].Description = '0';

  }
  static testMethod void test_getrelatedTasks_UseCase1(){
    List<Task> task_Obj  =  [SELECT Id,WhoId,WhatId,WhoCount,WhatCount,Subject,ActivityDate,Status,Priority,Description,IsRecurrence,Placeholder_for_next_call_set__c from Task];
    System.assertEquals(true,task_Obj.size()>0);
    PageReference pageRef = Page.ContactsTasks;
    pageRef.getParameters().put('id','test');
    Test.setCurrentPage(pageRef);

  }

    static testMethod void test_getrelatedTasks_UseCase2(){
    List<Task> task_Obj  =  [SELECT Id,WhoId,WhatId,WhoCount,WhatCount,Subject,ActivityDate,Status,Priority,Description,IsRecurrence,Placeholder_for_next_call_set__c from Task];
    System.assertEquals(true,task_Obj.size()>0);
    PageReference pageRef = Page.ContactsTasks;
    pageRef.getParameters().put('id','test');
    Test.setCurrentPage(pageRef);


    task_Obj[0].ActivityDate = date.parse('7/13/2022');
    task_Obj[0].Status='Not Started';
    task_Obj[0].Priority='High';
    task_Obj[0].Description = '0';

  }
}
Hi all, I created a Visualforce page where I need to rerender some formula fields (number output) but I cannot get them to rerender. I was able to do rerender on other elements in my page though, such as an html text.
<apex:page standardController="Contact" extensions="npsExtension" showHeader="false" sidebar="false">
<apex:form >
  <apex:actionFunction name="save" action="{!saveRecords}" reRender="k,l,m,n" />
<table >
   <tr >
        <td >
            <apex:outputText id="k" style="color:{!if(nps.Phone_Call__c='No','red','black')}"  value="Phone Call"/>
        </td>
        <td><apex:inputField onchange="myFunction()" value="{!nps.Phone_Call__c}" /></td>
        <td><apex:outputField id="l" value="{!nps.Phone_Call_Score__c}" /></td>
        <td><apex:outputField id="m" value="{!nps.Phone_Call_Weight__c}" /></td>
        <td><apex:outputField id="n" value="{!nps.Relationship_Score__c}" /></td>
    </tr>
</table >
<script>
   function myFunction(){
       save();
   };
</script>
</apex:page>

 
I have been searching for days but can't seem to find any clue. I have tried "lightning-datatable" component but it does not work. I was able to do it in Visualforce but now I need to do it in Lightning. Any idea where to start?
How do I go about controlling whether a pageblocksection is rendered or not based a clicking a button?
I want to invoke the save function when clicking outside or changing input of a Rich Text field. I tried using onclick and onchange in apex:inputField but it does not work.
I have a Visualforce page that autosaves based on time interval, using Javascript. I want to change it to autosave based on user input, meaning if user changes a field value or maybe if the user clicks on a different field. I have been trying to search for examples but I can't find any.
How do I go about dividing a record detail page into two or more pages but can still be accessed on the same record detail page? For example, if there are many fields in a detail page, instead of scrolling down to access more fields, you can click on a button that hides the 1st page and shows the 2nd page which shows the rest of the fields. There should also be an option to go back to first page.
Newbie dev here. Does anyone know why inline editing was disabled when I added the script below? The only reason I added it is because every time the page loads, the cursor moves to a specific field in the page, even though that was not last position of the cursor
 
<script>
    window.onload = function(){
        window.scrollTo(0,0);
    };
</script>

Not sure if you wanna see my Visualforce page since it's so long. I realize there is a similar question but it was not enough for me to resolve the issue.
Does anyone know why the cursor always lands on the same field whenever the page is loaded or reloaded? I have other Visualforce pages and other fields on the page but the cursor always lands on it.

User-added image
<apex:page standardController="Interview__c" sidebar="false" >
   <apex:form >
   <apex:pageBlock mode="maindetail" >
      
      <apex:pageBlockSection columns="3">
      
            <apex:pageBlockSectionItem dataStyle="background-color:#0E2D46"> <apex:outputText ></apex:outputText> </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem dataStyle="width:100%;text-align:center;background-color:#0E2D46;color:white;padding:7px">
                <apex:outputText > <b> Table Stakes </b></apex:outputText> </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem dataStyle="background-color:#0E2D46"> <apex:outputText ></apex:outputText> </apex:pageBlockSectionItem>
             
            <apex:pageBlockSectionItem dataStyle="vertical-align:middle;width:40%;text-align:center;background-color:#0E2D46;color:white">
                <apex:outputText > <b> Candidate's Search Status </b></apex:outputText> </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem dataStyle="width:40%;text-align:center">
                <apex:inputField value="{!Interview__c.Search_Status__c}"/> </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem dataStyle="width:20%;text-align:center">
                <apex:inputField value="{!Interview__c.StatusLogDate__c}" /> </apex:pageBlockSectionItem>

      </apex:pageBlockSection>

   </apex:pageBlock>
   <div align="center"> <apex:commandButton action="{!quicksave}" value="Save" /> </div>
   </apex:form>
</apex:page>

 
I want to send an email using classic email template that contains a link to a custom lightning component/page but I don't know how to pass the record Id from the URL in the email template. Is it possible? I only saw answers on how to pass Id from a button but not from a link.
Just like I can remove access to a particular object, how can I remove the user's access to Files or Attachments? Right now they can still access it if they use the global search function. I think there is no way to disable the global search function too. Any ideas?
Hi everyone, is it possible to single-click to edit a field in Visualforce? I want to do it while in detail mode/inline edit mode. So basically change the behavior of being able to edit just by single clicking the field, instead of double clicking?

Hello, I want to know if there's another way to allow user to input text that can be formatted using bold, underlined, italicize and bullets, without using Rich Text Area field, or maybe still use Rich Text Area field but make them smaller and hide the control bar? As you can see in the image, the Rich Text Area field looks too big compared to the other ones.

User-added image

Thanks

I am new to development and need help to pass test class code coverage for my controller extension. It is currently only at 63% coverage.

Controller Extension:
public class IVExtension {
public String sortOrder = 'Parameter__c ';
public Interview__c i { get; set; }
public List<Interview_Questions__c> getq(){
    List<Interview_Questions__c> results = Database.query(
        'SELECT Id, Parameter__c , ECA_Rating__c, Response_Notes__c, Question__c ' +
        'FROM Interview_Questions__c ' +
        'ORDER BY Parameter__c ASC '
    );
    return results; }

public ApexPages.StandardController sc;
public IVExtension(ApexPages.StandardController sc) {
    i = (Interview__c)sc.getRecord();
}

public PageReference saveRecord() {
update i.Interview_Questions__r;
return null;
}
}

Test Class:

@isTest
public class testIVExtension{

    testmethod static void testcondition0(){
        test.startTest();
        try{
              Interview__c i = new Interview__c (Job_Applicant__c = 'a0D3a00000NxusC');
              insert i;
              
            Interview_Questions__c q = new Interview_Questions__c(Interview_Parameter__c = 'a2Q3a000001QPcI',Interview__c = i.id,
            ECA_Rating__c = '1',Response_Notes__c = 'test',Question__c = 'test');
            insert q;
              
         ApexPages.StandardController sc = new ApexPages.standardController(i);
            IVExtension IE = new IVExtension(sc);
            IE.saveRecord();
        } catch (Exception e)
        {
            system.assert(e!=null);
        }
        test.stopTest();
    }
    testmethod static void testcondition1(){
        test.startTest();
        try{
          List<Interview_Questions__c> results = Database.query(
        'SELECT Id, Parameter__c , ECA_Rating__c, Response_Notes__c, Question__c ' +
        'FROM Interview_Questions__c ' +
        'ORDER BY Parameter__c ASC '
    );
        } catch (Exception e)
        {
            system.assert(e!=null);
        }
        test.stopTest();
    }
}
You can probably tell by now that I only understand half of what I'm doing...

So I have a VF page to show an inline editable related list of another object. The problem is since I used apex:repeat, it sorts by createdDate instead of a certain field that I want it to sort, which is the standard Name field. I have just started self studying Apex development and no prior coding exp.

Below is the extension:

public class IVExtension {
public Interview__c i { get; set; }
public List<Interview_Questions__c> q=new List<Interview_Questions__c>([SELECT Parameter__c,id FROM Interview_Questions__c
WHERE Interview_Questions__c.Interview__c =:i.id  ORDER BY Parameter__c DESC ]);


public ApexPages.StandardController sc;
public IVExtension(ApexPages.StandardController sc) {
    i = (Interview__c)sc.getRecord();
    q = [SELECT Parameter__c,id FROM Interview_Questions__c WHERE Interview_Questions__c.Interview__c =:i.id  ORDER BY Parameter__c DESC ];
}

public PageReference saveRecord() {
update i.Interview_Questions__r;
update i;
return null;
}
}


Here is my VF page:

<apex:page standardController="Interview__c"  sidebar="false" >
   <apex:form >
      <div align="center"> <apex:commandButton action="{!quicksave}" value="Save" /> </div>
   <apex:pageBlock mode="maindetail" >
    
                <apex:pageBlockSection columns="4">
        <apex:pageBlockSectionItem dataStyle="width:25%;text-align:center;background-color:#0E2D46;color:white;padding:7px">
            <apex:outputText > <b> Parameter </b></apex:outputText> </apex:pageBlockSectionItem>
       <apex:pageBlockSectionItem dataStyle="width:10%;text-align:center;background-color:#0E2D46;color:white;padding:7px" > <apex:outputText > <b>Question</b> </apex:outputText>
            </apex:pageBlockSectionItem> 
       <apex:pageBlockSectionItem dataStyle="width:35%;text-align:center;background-color:#0E2D46;color:white;padding:7px" > <apex:outputText > <b>ECA Rating</b> </apex:outputText>
            </apex:pageBlockSectionItem>
       <apex:pageBlockSectionItem dataStyle="text-align:center;background-color:#0E2D46;color:white;padding:7px">
            <apex:outputText > <b>Response / Notes</b> </apex:outputText>
       </apex:pageBlockSectionItem>
       
                <apex:repeat value="{!Interview__c.Interview_Questions__r}" var="ques" >
                       <apex:pageBlockSectionItem dataStyle="width:10%;padding:7px;background-color:#0E2D46;color:white">
                               <apex:inputField value="{!ques.Parameter__c}"/> </apex:pageBlockSectionItem>
                       <apex:pageBlockSectionItem dataStyle="width:30%;padding:7px;background-color:#0E2D46;color:white">
                               <apex:outputField value="{!ques.Question__c}" style=""/></apex:pageBlockSectionItem>
                       <apex:pageBlockSectionItem dataStyle="width:5%;padding:7px">
                               <apex:inputField value="{!ques.ECA_Rating__c}"/> </apex:pageBlockSectionItem>
                       <apex:pageBlockSectionItem dataStyle="width:55%;padding:7px">
                               <apex:inputField value="{!ques.Response_Notes__c}"/> </apex:pageBlockSectionItem>
                </apex:repeat>
                </apex:pageBlockSection>
   </apex:pageBlock>
   <div align="center"> <apex:commandButton action="{!quicksave}" value="Save" /> </div>
   </apex:form>
</apex:page>


Thanks,

Richard

Hi all, what's the best way to implement something like this table below (made using PPT). It has to be inline editable and formattable exactly like in the image. The column headers don't need to stay merged.
User-added image
What's the simplest way in Visualforce to show a related list that is sorted by a certain field? It should also be inline-editing enabled. Please post sample Visualforce and controller extension/ controller codes.
It does not look like I have an option to access apex classes from my Org using Visual Studio Code.
Hello everyone, I created a custom list of Event records using a custom controller and Visualforce page. In the list the user can edit an Event but after saving the change, it also changes the last modified date of the other records on the list, even though there was no change to the data. What can I do so that Salesforce will only update the record that was changed?
Below is my current custom controller:
public class EventsMDHomePage{

    public List<Event> eventsToday {get; set;}

    public EventsMDHomePage() {
        eventsToday = [
            SELECT FIELDS(STANDARD)
            FROM Event
            WHERE OwnerId =: UserInfo.getUserId() AND ActivityDate =: date.today()
            ORDER BY StartDateTime ASC
            LIMIT 1000];
    }
    
    public PageReference saveEvents() {
        try{
            update eventsToday;
        }
        catch(DmlException ex){
            ApexPages.addMessages(ex);
        }
        return null;
    }      
}
Hi guys, for some reason my test class says Pass in the Developer Console but code coverage is 0% at the same time. How can it pass the test if there is 0%? I only used a test class generator because I'm not good at creating test classess yet.

Here is my custom controller:
public class ContactTasks{
    public Event event;
    public ContactTasks() {
        event = [SELECT FIELDS(STANDARD) FROM Event WHERE Id = :ApexPages.currentPage().getParameters().get('id')];
    }
    public Event getEvent(){
        return event;
    }
    List <Task> relatedTasks;
        public List<Task> getrelatedTasks(){
        relatedTasks = [SELECT FIELDS(STANDARD)
                FROM Task
                WHERE WhoId= :this.event.WhoId
                ORDER BY ActivityDate DESC];
        return relatedTasks;
    }

    
}
Here is my test class:
@isTest
private class ContactTasks_Test{
  @testSetup
  static void setupTestData(){
    test.startTest();
    Contact contact_Obj = new Contact(LastName='Test');
    Insert contact_Obj;
    Event eventobj = new Event(WhoId = contact_Obj.id, DurationInMinutes = 10, ActivityDateTime = Datetime.now());
    Insert eventobj;
    Task task_Obj = new Task(WhoId = contact_Obj.id, ActivityDate = Date.today(), Status = 'Not Started', Priority = 'High', Description = '12', IsReminderSet = false, IsRecurrence = false, Placeholder_for_next_call_set__c = false, BD_Meeting_scheduled_by_InMail__c = false, Duplicate_Meeting__c = false, Automatic_Reply__c = false, Candidate_InMail__c = false, Bounced__c = false);
    Insert task_Obj; 
    test.stopTest();
  }
  static testMethod void test_getEvent_UseCase1(){
    List<Task> task_Obj  =  [SELECT Id,WhoId,WhatId,WhoCount,WhatCount,Subject,ActivityDate,Status,Priority,Description,IsRecurrence,Placeholder_for_next_call_set__c from Task];
    System.assertEquals(true,task_Obj.size()>0);
    PageReference pageRef = Page.ContactsTasks;
    pageRef.getParameters().put('id','test');
    Test.setCurrentPage(pageRef);
    Contact contact_Obj = new Contact(LastName='Test');
    Insert contact_Obj;
    Event eventobj = new Event(WhoId = contact_Obj.id, DurationInMinutes = 10, ActivityDateTime = Datetime.now());
    Insert eventobj;

  }

    static testMethod void test_getEvent_UseCase3(){
    List<Task> task_Obj  =  [SELECT Id,WhoId,WhatId,WhoCount,WhatCount,Subject,ActivityDate,Status,Priority,Description,IsRecurrence,Placeholder_for_next_call_set__c from Task];
    System.assertEquals(true,task_Obj.size()>0);
    PageReference pageRef = Page.ContactsTasks;
    pageRef.getParameters().put('id','test');
    Test.setCurrentPage(pageRef);


    task_Obj[0].ActivityDate = date.parse('7/13/2022');
    task_Obj[0].Status='Not Started';
    task_Obj[0].Priority='High';
    task_Obj[0].Description = '0';

  }
  static testMethod void test_getrelatedTasks_UseCase1(){
    List<Task> task_Obj  =  [SELECT Id,WhoId,WhatId,WhoCount,WhatCount,Subject,ActivityDate,Status,Priority,Description,IsRecurrence,Placeholder_for_next_call_set__c from Task];
    System.assertEquals(true,task_Obj.size()>0);
    PageReference pageRef = Page.ContactsTasks;
    pageRef.getParameters().put('id','test');
    Test.setCurrentPage(pageRef);

  }

    static testMethod void test_getrelatedTasks_UseCase2(){
    List<Task> task_Obj  =  [SELECT Id,WhoId,WhatId,WhoCount,WhatCount,Subject,ActivityDate,Status,Priority,Description,IsRecurrence,Placeholder_for_next_call_set__c from Task];
    System.assertEquals(true,task_Obj.size()>0);
    PageReference pageRef = Page.ContactsTasks;
    pageRef.getParameters().put('id','test');
    Test.setCurrentPage(pageRef);


    task_Obj[0].ActivityDate = date.parse('7/13/2022');
    task_Obj[0].Status='Not Started';
    task_Obj[0].Priority='High';
    task_Obj[0].Description = '0';

  }
}
Hi all, I created a Visualforce page where I need to rerender some formula fields (number output) but I cannot get them to rerender. I was able to do rerender on other elements in my page though, such as an html text.
<apex:page standardController="Contact" extensions="npsExtension" showHeader="false" sidebar="false">
<apex:form >
  <apex:actionFunction name="save" action="{!saveRecords}" reRender="k,l,m,n" />
<table >
   <tr >
        <td >
            <apex:outputText id="k" style="color:{!if(nps.Phone_Call__c='No','red','black')}"  value="Phone Call"/>
        </td>
        <td><apex:inputField onchange="myFunction()" value="{!nps.Phone_Call__c}" /></td>
        <td><apex:outputField id="l" value="{!nps.Phone_Call_Score__c}" /></td>
        <td><apex:outputField id="m" value="{!nps.Phone_Call_Weight__c}" /></td>
        <td><apex:outputField id="n" value="{!nps.Relationship_Score__c}" /></td>
    </tr>
</table >
<script>
   function myFunction(){
       save();
   };
</script>
</apex:page>

 
I have been searching for days but can't seem to find any clue. I have tried "lightning-datatable" component but it does not work. I was able to do it in Visualforce but now I need to do it in Lightning. Any idea where to start?
How do I go about dividing a record detail page into two or more pages but can still be accessed on the same record detail page? For example, if there are many fields in a detail page, instead of scrolling down to access more fields, you can click on a button that hides the 1st page and shows the 2nd page which shows the rest of the fields. There should also be an option to go back to first page.
Newbie dev here. Does anyone know why inline editing was disabled when I added the script below? The only reason I added it is because every time the page loads, the cursor moves to a specific field in the page, even though that was not last position of the cursor
 
<script>
    window.onload = function(){
        window.scrollTo(0,0);
    };
</script>

Not sure if you wanna see my Visualforce page since it's so long. I realize there is a similar question but it was not enough for me to resolve the issue.
I am trying to access a managed package vf page from Salesforce order(This is working fine), But I am getting an error message when I are accessing it from Communities. Any inputs on this??
I have checked all the vf page permission on community profile and all the setting are good, not sure why this is happening, Once I click on the page it is being redirect to a new page and showing the error as per the screenshot...Any inputs on this??User-added image
What's the simplest way in Visualforce to show a related list that is sorted by a certain field? It should also be inline-editing enabled. Please post sample Visualforce and controller extension/ controller codes.
Hi all, I am trying to learn development while building Apex classes. I got this error upon trying to deploy a custom controller and test class from sandbox to production:
"System.NullPointerException: Attempt to de-reference a null object"

Here is my controller:
public class MyController {

public final Contact c;
ApexPages.StandardController sc;
MyController m;
public MyController(ApexPages.StandardController sc) {
    this.c = (Contact)sc.getRecord();
}

public void quicksave() {
    Job_Applicant__c j = (Job_Applicant__c) sc.getRecord();
    update j.Contact_Candidate__r;
}
}

Here is my test class for the controller:
@isTest
public class testMyController{
public static testMethod void testMyController() {

    Contact c = new Contact(LastName = 'testmycontroller');
    insert c;
    
    Job_Applicant__c j = new Job_Applicant__c(Contact_Candidate__c = c.id);
    insert j;
    
        ApexPages.StandardController sc = new ApexPages.standardController(c);
    MyController m = new MyController(sc);
    System.assertEquals(m.c, c);
    
    Test.startTest();
    m.quicksave();
    test.stopTest();
}
}

Thanks
Hello, I am just learning development but I need to be able to use my custom controller I created for use in a visualforce page in production. I can't get past code coverage failure when I try to deploy. Not sure if there's something wrong with my custom controller. I tried all the existing test classes available in production. Below is the code for my controller:
public class MyController {

public ApexPages.StandardController sc;

public MyController(ApexPages.StandardController sc) {
    this.sc = sc;
}

public void quicksave() {
    AVTRRT__Job_Applicant__c j = (AVTRRT__Job_Applicant__c) sc.getRecord();
    update j.AVTRRT__Contact_Candidate__r;
}
}

 

Hello, I am new and teaching myself Visualforce development and I need help. I created a visualforce page to be placed on a child custom object record detail page.

All I want to do is allow my users to be able to edit some fields from the parent object (Contact) while they are on the child object (Job Applicant) record page. I was able to show the fields in the visualforce page, however, when I test it by make editing the field values and clicking Save, the changes do not save at all. I need to accomplish this in Classic interface.

<apex:page standardController="Job_Applicant__c" sidebar="false" >
   <apex:form >
   <apex:inlineEditSupport />
   <apex:pageBlock mode="maindetail" >
   <apex:pageBlockSection  >
           
         <apex:pageBlockSectionItem> <apex:outputField value="{!Job_Applicant__c.Contact_r.Handle_with_care__c}" /> </apex:pageBlockSectionItem>
         <apex:pageBlockSectionItem > <apex:outputField value="{!Job_Applicant__c.Contact_r.Geographic_Preferences_Notes__c}"/> </apex:pageBlockSectionItem>

   </apex:pageBlockSection>
 <apex:commandButton action="{!quicksave}" value="Save" />
   </apex:pageBlock>
   </apex:form>
</apex:page>
Hello. Does anyone know how to read the REPORT_DESCRIPTION from workbench?

I'm just looking to see if I can find any information about the row count of the report that was exported.

I downloaded some logs for ReportExport, not so much details on there except for the REPORT_DESCRIPTION column. See actual content below:
 
?last_modified_user_id=005j000000DTznr&irpe19=true&irpe18=true&irpe17=true&irpe16=true&irpe15=true&irpe14=true&_CONFIRMATIONTOKEN=VmpFPSxNakF5TUMwd09DMHhNRlF5TVRvME5qbzFNeTQxTkRWYSxEdlZpb0RCZV93NzZyNVdmcjlmZURTLFltVmxOakV4&cfsize=12&irpe13=true&tfg=0&irpe23=true&irpe22=true&irpe21=true&irpe20=true&rt=2&save_drill=0&Yman=no&cc10=false&currency=000&co=1&l=1&cp=b&cs=default&ct=none&v=142&ctsize=18&last_modified_date=7%2F15%2F2020+5%3A17+PM&bg2=16777215&bg1=16777215&cc22=false&cc23=false&colDt_c=CREATED_DATE&details=yes&pc0=00Nf100000Bnlin&export=Export&pc2=00N3a00000Ctr8r&pc1=00Nj0000003m1b9&pc3=00Nj000000AGKXy&cc19=false&colDt_q=custom&cc17=false&cc18=false&cc15=false&cc16=false&cc13=false&cc14=false&cc11=false&cc12=false&cc20=false&cc21=false&fg=0&scope=organization&irpe12=true&irpe11=true&irpe10=true&enc=ISO-8859-1&irpe7=true&irpe6=true&irpe9=true&irpe8=true&irpe3=false&irpe2=false&pv1=Connected%2CScheduled%2CMet+With+-+Intro+Meeting%2CMet+With+-+Follow-up+Meeting%2CClient%2CFormer+Client&irpe5=true&pv0=Peterson+Loftin&irpe4=true&pv3=6%2F8%2F2020&pv2=True&xf=localecsv&irpe1=false&irpe0=false&id=00O3a0000054WD8&cr_lowcolor0=12735572&cr_lowcolor2=12735572&cr_lowcolor1=12735572&csize=3&c_13=FIRST_NAME&cust_owner=005j000000DTznr&c_14=LAST_NAME&c_11=00Nj0000003I1rm&c_12=00Nj000000CMtyp&c_1=00Nf100000BnN4F&c_0=00Nf100000BnN4A&c_10=00Nj000000BdfLk&c_3=00Nf100000Ckeyk&show_grandtotal=true&c_2=00Nj000000BeTpB&c_5=00N3a00000Ctop4&c_4=00N3a00000CtouY&c_7=00Nf100000CIWvA&c_6=00N3a00000CtopE&c_9=00Nf100000CCSvd&chsa=mbars&c_8=00Nf100000CCSvY&cnt=52&sortdir=up&chda=no&c_28=00Nf100000CI1fd&c_29=00Nj000000CMInQ&c_26=00Nj0000003OdCU&duel0=00Nf100000BnN4A%2C00Nf100000BnN4F%2C00Nj000000BeTpB%2C00Nf100000Ckeyk%2C00N3a00000CtouY%2C00N3a00000Ctop4%2C00N3a00000CtopE%2C00Nf100000CIWvA%2C00Nf100000CCSvY%2C00Nf100000CCSvd%2C00Nj000000BdfLk%2C00Nj0000003I1rm%2C00Nj000000CMtyp%2CFIRST_NAME%2CLAST_NAME%2C00Nj000000Ap9SQ%2CACCOUNT.NAME%2C00Nj0000003RVJa%2C00Nj000000BfRv1%2C00Nf100000BnJav%2C00Nj0000003LJTd%2C00Nf100000CO0P1%2C00Nf100000Bnlin%2C00Nj0000003m1b9%2CCONTACT_ID%2C00Nj000000AGKXy%2C00Nj0000003OdCU%2C00Nj0000006fJGJ%2C00Nf100000CI1fd%2C00Nj000000CMInQ%2C00Nj0000008u4wB%2C00Nj0000008u4vS%2C00Nj000000CMtyk%2C00Nj000000CMtz4%2C00Nj000000CMtyu%2C00N3a00000Ctumk%2C00Nj000000CMtyG%2C00Nf100000CNA9y%2C00Nf100000CN3us%2CEMAIL%2C00Nj0000003OMa3%2C00Nj0000003OMV3%2C00Nf100000Bncp1%2C00Nj0000003BwGG%2C00Nj0000008lWc1%2C00Nj0000003sZif%2C00Nj00000097oRN%2C00Nj0000008txcC%2C00Nj0000008u51p%2C00Nj0000008voJC%2C00Nj0000003IIdG%2C00N3a00000CqNL1&topn=all&c_27=00Nj0000006fJGJ&c_35=00N3a00000Ctumk&c_36=00Nj000000CMtyG&c_33=00Nj000000CMtz4&chum=no&c_34=00Nj000000CMtyu&c_31=00Nj0000008u4vS&c_32=00Nj000000CMtyk&c_30=00Nj0000008u4wB&chsv=no&chst=no&format=tt&c_19=00Nf100000BnJav&sort=00Nf100000CO0P1&chsp=no&show_subtotals=true&c_17=00Nj0000003RVJa&c_18=00Nj000000BfRv1&c_15=00Nj000000Ap9SQ&c_16=ACCOUNT.NAME&c_24=CONTACT_ID&c_25=00Nj000000AGKXy&c_22=00Nf100000Bnlin&c_23=00Nj0000003m1b9&c_20=00Nj0000003LJTd&c_21=00Nf100000CO0P1&bgdir=2&chco=no&lsk=1&cr_highcolor1=5554772&cr_highcolor2=5554772&c_48=00Nj0000008u51p&sideBySide=false&c_49=00Nj0000008voJC&cc1=false&cc0=false&cc3=false&cc2=false&cc5=false&cc4=false&cc7=false&c_51=00N3a00000CqNL1&cc6=false&cc9=false&cc8=false&c_50=00Nj0000003IIdG&cust_name=Marj+-+Tracker&cr_midcolor0=12763732&cr_midcolor1=12763732&sal=yes&cr_midcolor2=12763732&cust_devName=Marj_Tracker&cheh=no&last_modified_by=Prince+Garcia&c_39=EMAIL&c_37=00Nf100000CNA9y&c_38=00Nf100000CN3us&c_46=00Nj00000097oRN&c_47=00Nj0000008txcC&pn1=ne&c_44=00Nj0000008lWc1&cr_highcolor0=5554772&pn0=eq&c_45=00Nj0000003sZif&pn3=le&c_42=00Nf100000Bncp1&pn2=eq&c_43=00Nj0000003BwGG&c_40=00Nj0000003OMa3&c_41=00Nj0000003OMV3
Without using Einstein Analytics, what would it take to be able to link a dashboard which automatically selects a filter based on the link that I sent the user, so the user won't have to select the filters? This would be useful in our case where a dashboard have as many as 50 filters at a time.
I'm trying to setup a workflow rule that writes the values of custom fields created directly in my organization to fields that exist on a visualforce page in a managed package. The workflow rule criteria is set to "created and everytime the record is edited."

The workflow rule works as expected when on a standard page; but the workflow rule isn't triggered when I edit fields on the visualforce page.

Is there a limitation preventing workflow rules from triggering when a visualforce page is being used for both the edit and detail views of the record? If so, is there a work around? I would prefer not to use an apex trigger for this particular task.

Thank you for your help.

I need to render a field based on values in a multi select picklist.  Basically if it contains Special Project, then render the special project field.  However, I can't use includes in the render formula or so says the error message.  Here is what I'm using.  Is there another way to do this?

 

 <apex:pageBlockSectionItem rendered="{!Includes(InteractionRequest.Interaction_Type__c, 'Special Project')  }">
                           
<apex:outputLabel value="Special Projects" for="{!InteractionRequest.Special_Projects__c}"/> 
     <apex:inputField value="{!InteractionRequest.Special_Projects__c}" required="false" />

</apex:pageBlockSectionItem>