• Priyamvada Sharma
  • NEWBIE
  • 160 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
I have a large number of records in Salesforce in a custom object. Each hour we loaded in more records for our users to work on. Sometimes they cannot work on some records so they close them down. This takes a long time to go into each one individually. So i want to give them a list of records based on a certain set of criteria and then they can update each one and click save. Seems simple but i have been tearing my hair out for days. Please help. I am VERY new to Salesforce. Please, please be very specific if you are able to give me guidance.

This is my controller (apex class)

public with sharing class Controller_FTFView{
    Transient public List<PD_Record__c> FTFRecords;
    public List<PD_Record__c> getFTFRecords() {
            FTFRecords= [
            SELECT Name, Closure_Outcome__c, FTF__c, FTF_Comment__c, FTF_Reason__c, RFA_Number__c,WR_Number__c
            FROM PD_Record__c
            WHERE WMIS_Patch__c Like '11A5%' AND Owner_Is_Me__c = 0 AND Job_Status__c = 'Closed - Successful' AND (Closure_Outcome__c = 'Parts Ordered - In Stock' OR Closure_Outcome__c = 'Parts Ordered - OOS - Is obtainable' or Closure_Outcome__c = 'One Time Buy - Obtainable' or Closure_Outcome__c = 'Safety Reasons i.e. Manufacturer referral' or Closure_Outcome__c = 'Appliance Replacement Rec. (ART)')];
        return FTFRecords;
    }
}

This is my visual force page

<apex:page Controller="Controller_FTFView" >
    <apex:sectionHeader title="" subtitle="Mass Edit"/>
    <apex:pageMessages />
    <apex:form >
            <apex:pageBlock mode="detail" title="Edit the following records" >
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Save"/>
                <apex:commandButton action="{!cancel}" value="Cancel"/>
                 </apex:pageBlockButtons>          
            <apex:pageBlockSection columns="1">
                  <apex:pageBlockTable value="{!FTFRecords}" var="p">
                    <apex:column value="{!p.Name}"/>          
                    <apex:column value="{!p.WR_Number__c}"/>
                    <apex:column value="{!p.RFA_Number__c}"/>
                    <apex:column value="{!p.Closure_Outcome__c}"/>     
                    <apex:column headerValue="FTF?" >                   
                        <apex:inputField value="{!p.FTF__c}"/>
                    </apex:column>
                    <apex:column headerValue="FTF Reason" >                   
                        <apex:inputField value="{!p.FTF_Reason__c}"/>
                    </apex:column>
                    <apex:column headerValue="FTF Comment" >
                        <apex:inputField value="{!p.FTF_Comment__c}"/>
                    </apex:column>                    
                  </apex:pageBlockTable>
       </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

It does not like these buttons                

<apex:commandButton action="{!save}" value="Save"/>
<apex:commandButton action="{!cancel}" value="Cancel"/>
              
Error is Error: Unknown method 'Controller_FTFView.save()'

If i remove the button, the code saves but when i try and add a value into one of my fields it just disappears on refresh of the data so obviously is not being commited to the record.

Please can someone give me some idea as to what i need to do, to do this seemingly simple task in Salesforce??
i am trying to fetch the records in query editor but it is showing bellow error, my profile is SystemAdministrator

sObject type 'Account' is not supported.User-added image