• Kristen Aldrich 14
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 11
    Replies
I'm not a developer but hoping this is a simple code adjustment! We have a Visualforce page where the CSS header overlaps with the first line of the body. I'm pasting my VF page code below. How can I adjust to ensure our logo header doesn't overlap with the body? Thank you! 
<apex:page id="forgotPassword" showHeader="false" controller="ChangePasswordController" standardStylesheets="false" doctype="html-5.0" sidebar="false" title="Forgot Password">
 <apex:form >
 
<html>
  <head>
    <title>Forgot Password</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <link rel="stylesheet"  type="text/css" href="/resource/1512657972000/CSSStyle/CSSStyle/Style/main.css"/>
     <link type="text/css" rel="stylesheet" href="/resource/1512657972000/CSSStyle/CSSStyle/Style/bootstrap.min.css"/>
    <link type="text/css" rel="stylesheet" href="/resource/1512657972000/CSSStyle/CSSStyle/Style/customAMC.css"/>
    <script src="//code.jquery.com/jquery.min.js"></script>
 
  </head>  
  <body>
    <div class="body-container">
      <div class="head">
        <h1 class="maintitle">Change Password</h1>
        <p class="maindescription">Please provide your new Password</p>
         <label>Your password must be 8 characters long and a mix of letters and numbers. Please don't use your previous three passwords.</label>
                <br></br>
                <br></br>
      </div>
      <div class="login-form">
      <apex:pageMessages ></apex:pageMessages>
             <!-- <div class="form-group">  
              <apex:outputLabel value="Old Password" for="oldpsw" />              
                <apex:inputSecret required="true" id="oldpsw"  value="{!oldPassword}" style="form-control" />
              </div> -->
              <apex:outputPanel styleClass="form-group" layout="block" rendered="{ !$Site.IsPasswordExpired}" >
                  <apex:outputLabel value="Old Password" for="oldpsw" rendered="{ !$Site.IsPasswordExpired}" />              
                <apex:inputSecret required="true" id="oldpsw"  value="{!oldPassword}" rendered="{ !$Site.IsPasswordExpired}" style="form-control" title="Please use 8 letter password with mix of Alphanumeric Characters"/>
              </apex:outputPanel>

              <div class="form-group">
                <label>New Password</label>
                <apex:inputSecret id="psw" value="{!newPassword}" style="form-control" title="Please use 8 letter password with mix of Alphanumeric Characters"/>
              </div>
              <div class="form-group">
                <label>Verify New Password</label>
                <apex:inputSecret id="vpsw" value="{!verifyNewPassword}" style="form-control" title="Please use 8 letter password with mix of Alphanumeric Characters"/>
              </div>
        <div class="form-group">
        <apex:commandButton id="cpwbtn" action="{!changePassword}" value="{!$Label.site.change_password}" styleclass="btn btn-submit"/>
        </div></div>
    </div>
    <div class="body-container footer">
      <div class="helpcontent footermember">Need Help? Email <a href="mailto:amcinformation@outdoors.org">amcinformation@outdoors.org</a></div>
      <div class="copyright footermember">
         &copy; Copyright 2018 All Rights Reserved. Appalachian Mountain Club, 10 City Square, Boston, MA 02129 
        P: 617-523-0655 F: 617-523-0722 | <a href="#">Privacy Policy</a>
      </div>
    </div>
    <div class="brandbar"></div>
  </body>
</html>
 
 </apex:form>
  
</apex:page>

 
Hi there! Any recommendations for a Salesforce Developers consultant? We are trying to add a security measure to a Communities Self Registration visualforce page and need a developer to implement functionality (an update to our Apex Controller to ensure the registration form cannot be submitted when certain field values are entered). We're shopping around for quote comparisons - so far we have just 1 quote from a company we've worked with in the past. Your help is greatly appreciated!
I received 100+ error emails overnight that all look a bit like what I've copied/pasted below. I'm not a developer and am trying to figure out how to fix this. Luckily it's in our Partial Sandbox, so is not affecting our Production org but still, would like to get to the bottom of it. From what I've read, a duplicate field error like this means there are fields with identical API names and the query errors out essentially not knowing which one to use/reference. I do see fields with the label "Amount" with identical APIs but nothing that has changed or been added in the last couple days, which makes me think why would this error suddenly come up now. Where do I find the query? How do I identify which Amount field it's looking for? And where/how do I update the query to fix this?

Error Type: System.QueryException
Error Date: 2019-12-13 04:15:20
Message: "npsp__Largest_Soft_Credit_Date__c,npo02__LastOppAmount__c,npo02__LastCloseDate__c,npo02__LastMembershipAmount__c
^
ERROR at Row:1:Column:350
duplicate field selected: Amount

Rollups State:"
Context: CRLP.ContactSoftCredit

Stack Trace:
No stacktrace available at the time of saving the record. (npsp)
I received the following message (below) about a Flow error and am having a hard time deciphering what action steps I need to take to fix this. It seems to lie in an Apex class or trigger. For context, we use Click & Pledge for payment processing online which creates Opportunities in Salesforce. SF support got as far as identifying the issue is our custom trigger: CandP_OpportunityLineItemProcess in method executeOLIAllocationProcess. But we don't have Premier support so they can't tell me anything more nor what needs to be altered. Here is the information from the email notification:

Error element myRule_1_A1 (FlowActionCall).
An Apex error occurred: System.AsyncException: Future method cannot be called from a future or batch method: CandP_OpportunityLineItemProcess.executeOLIAllocationProcess(Set)
________________________________________
Flow Details
Flow API Name: Opp_Product_PB
Type: Record Change Process
Version: 1
Status: Active
Org: Appalachian Mountain Club (00D50000000cBTw)
Flow Interview Details
Interview Label: Opp_Product_PB-1_InterviewLabel
Current User: Rachel Sensenig (00550000007yb9w)
Start time: 9/25/2019 11:25 AM
Duration: 0 seconds
How the Interview Started
Rachel Sensenig (00550000007yb9w) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = null
myVariable_current = OpportunityLineItem (00k2J00000lKASwQAO)
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!$Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "9/25/2019 11:25 AM"
DECISION: myDecision
Outcome executed: myRule_1
Outcome conditions:
{!myVariable_current.Opportunity.Integration_Source__c} (Click and Pledge) Equals Click and Pledge
CANDP_OPPORTUNITYLINEITEMPROCESS (APEX): myRule_1_A1
Inputs:
oppLineIds = {!myVariable_current.Id} (00k2J00000lKASwQAO)
________________________________________
Error Occurred: An Apex error occurred: System.AsyncException: Future method cannot be called from a future or batch method: CandP_OpportunityLineItemProcess.executeOLIAllocationProcess(Set)
________________________________________
________________________________________
Salesforce Error ID: 1315178525-18218 (-271902632)


Please help!
When I run a particular flow in our Partial Sandbox (Lightning), I get the following errors:
  • FIELD_FILTER_VALIDATION_EXCEPTION: Value does not exist or does not match filter criteria.
  • UNABLE_TO_LOCK_ROW: unable to obtain exclusive access to this record or 165 records. 
  • CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: SVT_OpportunityTrigger: System.LimitException: Too many SOQL queries: 101.
I think the first one is a matter of checking related lookup filters on applicable fields in the objects utilized in the flow. The second one I don't know what it means. The third one is something wrong with my Trigger (set up by a consultant), but I don't know Apex all that well.

Can someone help with one or all of these error issues? Here's the Apex Trigger code for the third error:
 
trigger SVT_OpportunityTrigger on Opportunity (before insert, before update, before delete, 
                                after insert,after update, after delete, after undelete) {
    //System.debug('Before Trigger Control------> ');
    TriggerSettings__c control = TriggerSettings__c.getOrgDefaults();
    if(!control.OpportunityTrigger__c)
    {

        SVT_OpportunityTriggerHandler handler = new SVT_OpportunityTriggerHandler(Trigger.isExecuting, Trigger.size);
        SVT_OpportunityHandler opportunityHandler = new SVT_OpportunityHandler();
        /*
        SVT_OpportunityTriggerHandler.hasBeenCalled = true;
        
        if((Trigger.isBefore&& Trigger.isUpdate)||(Trigger.isAfter && Trigger.isInsert)||(Trigger.isAfter && Trigger.isUpdate)){
            OpportunityHandler.newSObjectMap = Trigger.newMap;
            OpportunityHandler.SObjectIds = Trigger.newMap.keySet();
        }
        
        if(Trigger.isUpdate || Trigger.isDelete){
            OpportunityHandler.oldSObjectMap = Trigger.oldMap;
            OpportunityHandler.oldSObjects = Trigger.old;
        }
        
        if(Trigger.isInsert || Trigger.isUpdate){
            OpportunityHandler.newSObjects = Trigger.new;
        } */
        
        handler.handler = opportunityHandler;
        
        if(Trigger.isInsert && Trigger.isBefore){
        //  System.debug('Trigger Before Insert Check');
            handler.onBeforeInsert(Trigger.new);
        }else if (Trigger.isInsert && Trigger.isAfter){
            //System.debug('Trigger After Insert Check');
            //try{
            handler.onAfterInsert(Trigger.new, Trigger.newMap, Trigger.newMap.keySet());
            If(!System.isBatch()) SVT_OpportunityTriggerHandler.onAfterInsertAsync(Trigger.newMap.keySet());
          //  OpportunityLineItemTriggerHandler.onAfterInsertAsync(Trigger.newMap.keySet());
            //}catch(Exception ex){
                //System.debug('Error: '+ ex.getMessage()+'. ON LIne: '+ ex.getLineNumber()+'. Stack Trace: '+ ex.getStackTraceString());
        //  }
        }else if (Trigger.isUpdate && Trigger.isAfter){
            //System.debug('Trigger After Update Check');
            handler.onAfterUpdate(Trigger.new, Trigger.old, Trigger.newMap, Trigger.oldMap,Trigger.newMap.keySet());
           // OpportunityLineItemTriggerHandler.onAfterUpdateAsync(Trigger.newMap.keySet());
        }else if (Trigger.isBefore && Trigger.isUpdate){
            //System.debug('Before Update Trigger Check');
            handler.onBeforeUpdate(Trigger.new, Trigger.old, Trigger.newMap,Trigger.oldMap, Trigger.newMap.keySet());
        }else if (Trigger.isBefore && Trigger.isDelete){
            //System.debug('Before Delete Trigger Check');
            handler.onBeforeDelete(Trigger.old, Trigger.oldMap);
        }else if (Trigger.isAfter && Trigger.isDelete){
            //System.debug('After Delete Trigger Check');
            handler.onAfterDelete(Trigger.old, Trigger.oldMap);
        }else if (Trigger.isUndelete){
            //System.debug('Undelete Trigger Check');
            handler.onUndelete(Trigger.new);
        }
        //added by Aman    -- COmmented out by PR 12/19/2017. This is purely for launch. Remove this ASAP.
  /*     if((trigger.isafter && trigger.isinsert) || (trigger.isafter && trigger.isupdate)){
         try{
            SVT_OpportunityHandler.CreateContactFromOpp(trigger.new,trigger.newmap,Trigger.newMap.keySet());
            }catch(Exception ex){
                System.debug('Error: '+ ex.getMessage() +'. Stack Trace: '+ex.getStackTraceString());
            }
            
        }  */
    }
}
I've created a screenflow launched by a button on the page layout. I want to limit which users are able to access and run the flow but the users that need it have varying profiles. I saw some information about using the {!User.ID} global variable in a formula to identify who can use the flow but got a bit lost. Can someone explain how to ensure only certain users can actually click the button and run the flow? Thank you!
I've been receiving email notifications with Subject: Registration error in site AMC_Community with the body: "AMC_Community registration accountID parameter value is not valid". This issue seems to happen when someone tries to self register for our Community for the first time. If they have a preexisting contact in SF, they are able to register a user in the Community. Otherwise, this error is thrown. After speaking with SF support, we narrowed down the issue to the Apex Class 'CommunitiesSelfRegController'
/**
* An apex page controller that supports self registration of users in communities that allow self registration
*/
public class CommunitiesSelfRegController {
    
    public String firstName {get; set;}
    public String lastName {get; set;}
    public String email {get; set;}
    public String password {get; set {password = value == null ? value : value.trim(); } }
    public String confirmPassword {get; set { confirmPassword = value == null ? value : value.trim(); } }
    //public String communityNickname {get; set { communityNickname = value == null ? value : value.trim(); } }
    public String Zipcode{get;set;}
    public String City{get;set;}
    public String Street{get;set;}
    String userId;
    String userName ;
    List<Contact> ConList = new list<contact>();
    Map<id,user> MapOfUser =  new Map<id,user>();
    user u;
    user[] UsrOld;
    boolean CheckCon = false;
    DateTime currentTime = System.now(); 
    Long timeInMili = currentTime.getTime()/1000; 
    map<id,contact> MapofExternalContact = new map<id,contact>();
    Map<id,id> MapofUserContact = new map<id,id>();
    set<id> SetOfContacts = new set<id>();
    boolean createaccount=true;

    
    //Aman
    public String country {get;set;}
    public String state {get;set;}
    //Aman
    public CommunitiesSelfRegController() {getCountries();getStates();}
    
    private boolean isValidPassword() {
        return password == confirmPassword;
    }
    
    public List<SelectOption> getCountries()
    {
        List<SelectOption> options = new List<SelectOption>();
        options.add(new SelectOption('None','--- Select ---'));        
        options.add(new SelectOption('United States','United States'));
        options.add(new SelectOption('Canada','Canada'));
        return options;
    } 
    
    public List<SelectOption> getStates()
    {
        List<SelectOption> options = new List<SelectOption>();
        
        if(country == 'United States')
        {   
            options.add(new SelectOption('None','--- Select ---'));    
            List<countrystates__c>  CountryList= [select country__c,state__c,abbrevation__c from countrystates__c where country__c ='United States' order by state__c];
            For(Countrystates__c CS : CountryList){
                options.add(new SelectOption(Cs.abbrevation__c ,CS.State__c));  
                
            }
            
        }
        else if(country == 'Canada')
        {   
            options.add(new SelectOption('None','--- Select ---'));    
            List<countrystates__c>  CountryList= [select country__c,state__c,abbrevation__c from countrystates__c where country__c ='Canada'];
            For(Countrystates__c CS : CountryList){
                options.add(new SelectOption(Cs.abbrevation__c ,CS.State__c));  
                
            }
            
        }
        else
        {
            options.add(new SelectOption('None','--- Select ---'));
        }      
        return options;
    }       
    
    public PageReference registerUser() {
        
        // it's okay if password is null - we'll send the user a random password in that case
        if (!isValidPassword()) {
            ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.ERROR, Label.site.passwords_dont_match);
            ApexPages.addMessage(msg);
            return null;
        }    
        
        
        try {
            
            for(contact con : [select id,name,firstname,lastname,mailingpostalcode,email,accountid from contact where email = :email]){
                
                MapofExternalContact.put(con.id,con);
                SetOfContacts.add(con.id);
                 
                
                
            }
            
            for(user u : [select id,contactid from user where contactid in : SetOfContacts]){
                if(u.id != null){
                MapofUserContact.put(u.contactid,u.id);
                }
            }
            if(MapofExternalContact.isempty()==false){
                for(contact c :MapofExternalContact.values()){
                    if(c.email == email && MapofUserContact.containskey(c.id)){
                        
                        ApexPages.Message msg1 = new ApexPages.Message(ApexPages.Severity.ERROR, 'User already exists in database');
                        ApexPages.addMessage(msg1);
                        return null;  
                        
                    }else if (!MapofUserContact.containskey(c.id) && c.firstname.equals(firstname) && c.lastname == lastname && c.mailingpostalcode == Zipcode && c.email == email){
                        
                        u = CreateCommUser.CreateUser(label.ProfileID,firstName,LastName,email, c.id);   
                        userId = (String)u.id;
                        
                        checkcon=true;
                    }else if (!MapofUserContact.containskey(c.id) && c.email == email ) {
                        
                        String profileId = label.ProfileID;// To be filled in by customer.
                        String roleEnum = '';// To be filled in by customer.                
                        String accountId = c.accountid; // To be filled in by customer.                
                        userName = email;
                        List<string> split = Email.split('@', 0);
                        User u = new User();
                        u.Username = userName;
                        u.Email = email;
                        u.FirstName = firstName;
                        u.LastName = lastName;
                        u.CommunityNickname = split[0]+timeInMili;
                        u.ProfileId = label.ProfileID; 
                        If(!String.isBlank(Zipcode) || zipcode<>null){
                            u.PostalCode=zipcode;    
                        }
                        If((!String.isBlank(Country) || country<>null) && (Country=='Canada'||country=='United States')){
                            u.country=country;
                        }
                        If(!String.isBlank(city) || city<>null){
                            u.city=city;
                        }
                        If((!String.isBlank(State) || state<>null) && state!= 'None'){
                            u.state=state;}
                        If(!String.isBlank(street) || street<>null){
                            u.street=street;}
                        u.EmailEncodingKey = 'UTF-8';
                        u.LanguageLocaleKey = 'en_US';
                        u.LocalesIdKey = 'en_US';
                        u.TimezonesIdKey = 'America/New_York';                
                        userId = Site.createExternalUser(u, accountId, password);   
                        createaccount=false; 
                    }
                    
                }
            }       else if(MapofExternalContact.isempty()==true){
                
                String profileId = label.ProfileID;// To be filled in by customer.
                String roleEnum = '';// To be filled in by customer.                
                String accountId = Label.CommunityHouseHoldAccount; // To be filled in by customer.                
                userName = email;
                List<string> split = Email.split('@', 0);
                User u = new User();
                u.Username = userName;
                u.Email = email;
                u.FirstName = firstName;
                u.LastName = lastName;
                u.CommunityNickname = split[0]+timeInMili;
                u.ProfileId = label.ProfileID; 
                If(!String.isBlank(Zipcode) || zipcode<>null){
                    u.PostalCode=zipcode;    
                }
                If((!String.isBlank(Country) || country<>null) && (Country=='Canada'||country=='United States')){
                    u.country=country;
                }
                If(!String.isBlank(city) || city<>null){
                    u.city=city;
                }
                If((!String.isBlank(State) || state<>null) && state!= 'None'){
                    u.state=state;}
                If(!String.isBlank(street) || street<>null){
                    u.street=street;}
                u.EmailEncodingKey = 'UTF-8';
                u.LanguageLocaleKey = 'en_US';
                u.LocalesIdKey = 'en_US';
                u.TimezonesIdKey = 'America/New_York';                
                userId = Site.createExternalUser(u, accountId, password);                
            }
            
        }catch(exception ex) {
            
            string errors = ex.getMessage();      
            integer linenumber = ex.getLineNumber();                  
            ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.ERROR, errors);
            ApexPages.addMessage(msg);
        } 
        
        if (userId != null) { 
            if (password != null && password.length() > 1) {
                //return Site.login(userName, password, ApexPages.currentPage().getParameters().get('startURL'));
            }
            else {
                
                PageReference page = System.Page.CommunitiesSelfRegConfirm;
                page.setRedirect(true);
                if(Checkcon == false){
                    CreateCommUser.CreateUpdateAccount(userid,createaccount);
                }
                return page;                
                
            }
        }
        return null;
        
        
    }
}

but I'm at a loss as to what is wrong with the code, which was developed and implemented by a consultant we no longer work with. I'll paste the code here. Any help is greatly appreciated!
I'm creating a Visualforce pageBlockTable for some custom fields on an Opportunity record. It works great when data is entered upon creation of an Opportunity record, but any blank fields in the pageBlockTable are inaccessible so I can't create the opportunity and go back to add data into those fields. How can I make blank fields editable in the table?
 
<apex:page standardController="Opportunity">
    <apex:form >
        <apex:pageBlock mode="inlineEdit">
             <apex:pageBlockButtons >
                <apex:commandButton action="{!edit}" id="editButton" value="Edit"/>
                <apex:commandButton action="{!save}" id="saveButton" value="Save"/>
                <apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel"/>
                </apex:pageBlockButtons>
            <apex:pageBlocktable value="{!Opportunity.Meal_Date_1__c}" var="Meal_Date_1__c">
                  <apex:column headerValue="Day 1">
                    <apex:inputfield value="{!Opportunity.Meal_Date_1__c}"/>
                    <apex:outputField value="{!Opportunity.Meal_Date_1__c}"/>
                </apex:column>
                <apex:column headerValue="Breakfast">    
                    <apex:inputField value="{!Opportunity.Breakfast_1__c}" />
                </apex:column>
                <apex:column headerValue="Lunch">
                    <apex:inputField value="{!Opportunity.Lunch_1__c}" />
                </apex:column>
                <apex:column headerValue="Dinner">
                    <apex:inputField value="{!Opportunity.Dinner_1__c}" />
                </apex:column>
                <apex:column headerValue="Time">
                    <apex:inputField value="{!Opportunity.Meal_Time_1__c}" />
                </apex:column>
                </apex:pageBlockTable>
                <apex:pageBlockTable value="{!Opportunity.Meal_Date_2__c}" var="Meal_Date_2__c">
                <apex:column headerValue="Day 2">
                    <apex:inputField value="{!Opportunity.Meal_Date_2__c}" />
                </apex:column>
                <apex:column headerValue="Breakfast">    
                    <apex:inputField value="{!Opportunity.Breakfast_2__c}" />
                </apex:column>
                <apex:column headerValue="Lunch">
                    <apex:inputField value="{!Opportunity.Lunch_2__c}" />
                </apex:column>
                <apex:column headerValue="Dinner">
                    <apex:inputField value="{!Opportunity.Dinner_2__c}" />
                </apex:column>
                <apex:column headerValue="Time">
                    <apex:inputField value="{!Opportunity.Meal_Time_2__c}" />
                </apex:column>
                <apex:inlineEditSupport event="ondblClick" 
                        showOnEdit="saveButton,cancelButton" hideOnEdit="editButton" />
                </apex:pageBlockTable>
                <apex:pageBlockTable value="{!Opportunity.Meal_Date_3__c}" var="Meal_Date_3__c">
                <apex:column headerValue="Day 3">
                    <apex:inputField value="{!Opportunity.Meal_Date_3__c}" />
                </apex:column>
                <apex:column headerValue="Breakfast">    
                    <apex:inputField value="{!Opportunity.Breakfast_3__c}" />
                </apex:column>
                <apex:column headerValue="Lunch">
                    <apex:inputField value="{!Opportunity.Lunch_3__c}" />
                </apex:column>
                <apex:column headerValue="Dinner">
                    <apex:inputField value="{!Opportunity.Dinner_3__c}" />
                </apex:column>
                <apex:column headerValue="Time">
                    <apex:inputField value="{!Opportunity.Meal_Time_3__c}" />
                </apex:column>
                <apex:inlineEditSupport event="ondblClick" 
                        showOnEdit="saveButton,cancelButton" hideOnEdit="editButton" />
                </apex:pageBlockTable>
                <apex:pageBlockTable value="{!Opportunity.Meal_Date_4__c}" var="Meal_Date_4__c">
                <apex:column headerValue="Day 4">
                    <apex:inputField value="{!Opportunity.Meal_Date_4__c}" />
                </apex:column>
                <apex:column headerValue="Breakfast">    
                    <apex:inputField value="{!Opportunity.Breakfast_4__c}" />
                </apex:column>
                <apex:column headerValue="Lunch">
                    <apex:inputField value="{!Opportunity.Lunch_4__c}" />
                </apex:column>
                <apex:column headerValue="Dinner">
                    <apex:inputField value="{!Opportunity.Dinner_4__c}" />
                </apex:column>
                <apex:column headerValue="Time">
                    <apex:inputField value="{!Opportunity.Meal_Time_4__c}" />
                </apex:column>
                <apex:inlineEditSupport event="ondblClick" 
                        showOnEdit="saveButton,cancelButton" hideOnEdit="editButton" />
                </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 
Hi there! Any recommendations for a Salesforce Developers consultant? We are trying to add a security measure to a Communities Self Registration visualforce page and need a developer to implement functionality (an update to our Apex Controller to ensure the registration form cannot be submitted when certain field values are entered). We're shopping around for quote comparisons - so far we have just 1 quote from a company we've worked with in the past. Your help is greatly appreciated!
I received 100+ error emails overnight that all look a bit like what I've copied/pasted below. I'm not a developer and am trying to figure out how to fix this. Luckily it's in our Partial Sandbox, so is not affecting our Production org but still, would like to get to the bottom of it. From what I've read, a duplicate field error like this means there are fields with identical API names and the query errors out essentially not knowing which one to use/reference. I do see fields with the label "Amount" with identical APIs but nothing that has changed or been added in the last couple days, which makes me think why would this error suddenly come up now. Where do I find the query? How do I identify which Amount field it's looking for? And where/how do I update the query to fix this?

Error Type: System.QueryException
Error Date: 2019-12-13 04:15:20
Message: "npsp__Largest_Soft_Credit_Date__c,npo02__LastOppAmount__c,npo02__LastCloseDate__c,npo02__LastMembershipAmount__c
^
ERROR at Row:1:Column:350
duplicate field selected: Amount

Rollups State:"
Context: CRLP.ContactSoftCredit

Stack Trace:
No stacktrace available at the time of saving the record. (npsp)
I received the following message (below) about a Flow error and am having a hard time deciphering what action steps I need to take to fix this. It seems to lie in an Apex class or trigger. For context, we use Click & Pledge for payment processing online which creates Opportunities in Salesforce. SF support got as far as identifying the issue is our custom trigger: CandP_OpportunityLineItemProcess in method executeOLIAllocationProcess. But we don't have Premier support so they can't tell me anything more nor what needs to be altered. Here is the information from the email notification:

Error element myRule_1_A1 (FlowActionCall).
An Apex error occurred: System.AsyncException: Future method cannot be called from a future or batch method: CandP_OpportunityLineItemProcess.executeOLIAllocationProcess(Set)
________________________________________
Flow Details
Flow API Name: Opp_Product_PB
Type: Record Change Process
Version: 1
Status: Active
Org: Appalachian Mountain Club (00D50000000cBTw)
Flow Interview Details
Interview Label: Opp_Product_PB-1_InterviewLabel
Current User: Rachel Sensenig (00550000007yb9w)
Start time: 9/25/2019 11:25 AM
Duration: 0 seconds
How the Interview Started
Rachel Sensenig (00550000007yb9w) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = null
myVariable_current = OpportunityLineItem (00k2J00000lKASwQAO)
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!$Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "9/25/2019 11:25 AM"
DECISION: myDecision
Outcome executed: myRule_1
Outcome conditions:
{!myVariable_current.Opportunity.Integration_Source__c} (Click and Pledge) Equals Click and Pledge
CANDP_OPPORTUNITYLINEITEMPROCESS (APEX): myRule_1_A1
Inputs:
oppLineIds = {!myVariable_current.Id} (00k2J00000lKASwQAO)
________________________________________
Error Occurred: An Apex error occurred: System.AsyncException: Future method cannot be called from a future or batch method: CandP_OpportunityLineItemProcess.executeOLIAllocationProcess(Set)
________________________________________
________________________________________
Salesforce Error ID: 1315178525-18218 (-271902632)


Please help!
When I run a particular flow in our Partial Sandbox (Lightning), I get the following errors:
  • FIELD_FILTER_VALIDATION_EXCEPTION: Value does not exist or does not match filter criteria.
  • UNABLE_TO_LOCK_ROW: unable to obtain exclusive access to this record or 165 records. 
  • CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: SVT_OpportunityTrigger: System.LimitException: Too many SOQL queries: 101.
I think the first one is a matter of checking related lookup filters on applicable fields in the objects utilized in the flow. The second one I don't know what it means. The third one is something wrong with my Trigger (set up by a consultant), but I don't know Apex all that well.

Can someone help with one or all of these error issues? Here's the Apex Trigger code for the third error:
 
trigger SVT_OpportunityTrigger on Opportunity (before insert, before update, before delete, 
                                after insert,after update, after delete, after undelete) {
    //System.debug('Before Trigger Control------> ');
    TriggerSettings__c control = TriggerSettings__c.getOrgDefaults();
    if(!control.OpportunityTrigger__c)
    {

        SVT_OpportunityTriggerHandler handler = new SVT_OpportunityTriggerHandler(Trigger.isExecuting, Trigger.size);
        SVT_OpportunityHandler opportunityHandler = new SVT_OpportunityHandler();
        /*
        SVT_OpportunityTriggerHandler.hasBeenCalled = true;
        
        if((Trigger.isBefore&& Trigger.isUpdate)||(Trigger.isAfter && Trigger.isInsert)||(Trigger.isAfter && Trigger.isUpdate)){
            OpportunityHandler.newSObjectMap = Trigger.newMap;
            OpportunityHandler.SObjectIds = Trigger.newMap.keySet();
        }
        
        if(Trigger.isUpdate || Trigger.isDelete){
            OpportunityHandler.oldSObjectMap = Trigger.oldMap;
            OpportunityHandler.oldSObjects = Trigger.old;
        }
        
        if(Trigger.isInsert || Trigger.isUpdate){
            OpportunityHandler.newSObjects = Trigger.new;
        } */
        
        handler.handler = opportunityHandler;
        
        if(Trigger.isInsert && Trigger.isBefore){
        //  System.debug('Trigger Before Insert Check');
            handler.onBeforeInsert(Trigger.new);
        }else if (Trigger.isInsert && Trigger.isAfter){
            //System.debug('Trigger After Insert Check');
            //try{
            handler.onAfterInsert(Trigger.new, Trigger.newMap, Trigger.newMap.keySet());
            If(!System.isBatch()) SVT_OpportunityTriggerHandler.onAfterInsertAsync(Trigger.newMap.keySet());
          //  OpportunityLineItemTriggerHandler.onAfterInsertAsync(Trigger.newMap.keySet());
            //}catch(Exception ex){
                //System.debug('Error: '+ ex.getMessage()+'. ON LIne: '+ ex.getLineNumber()+'. Stack Trace: '+ ex.getStackTraceString());
        //  }
        }else if (Trigger.isUpdate && Trigger.isAfter){
            //System.debug('Trigger After Update Check');
            handler.onAfterUpdate(Trigger.new, Trigger.old, Trigger.newMap, Trigger.oldMap,Trigger.newMap.keySet());
           // OpportunityLineItemTriggerHandler.onAfterUpdateAsync(Trigger.newMap.keySet());
        }else if (Trigger.isBefore && Trigger.isUpdate){
            //System.debug('Before Update Trigger Check');
            handler.onBeforeUpdate(Trigger.new, Trigger.old, Trigger.newMap,Trigger.oldMap, Trigger.newMap.keySet());
        }else if (Trigger.isBefore && Trigger.isDelete){
            //System.debug('Before Delete Trigger Check');
            handler.onBeforeDelete(Trigger.old, Trigger.oldMap);
        }else if (Trigger.isAfter && Trigger.isDelete){
            //System.debug('After Delete Trigger Check');
            handler.onAfterDelete(Trigger.old, Trigger.oldMap);
        }else if (Trigger.isUndelete){
            //System.debug('Undelete Trigger Check');
            handler.onUndelete(Trigger.new);
        }
        //added by Aman    -- COmmented out by PR 12/19/2017. This is purely for launch. Remove this ASAP.
  /*     if((trigger.isafter && trigger.isinsert) || (trigger.isafter && trigger.isupdate)){
         try{
            SVT_OpportunityHandler.CreateContactFromOpp(trigger.new,trigger.newmap,Trigger.newMap.keySet());
            }catch(Exception ex){
                System.debug('Error: '+ ex.getMessage() +'. Stack Trace: '+ex.getStackTraceString());
            }
            
        }  */
    }
}
I'm creating a Visualforce pageBlockTable for some custom fields on an Opportunity record. It works great when data is entered upon creation of an Opportunity record, but any blank fields in the pageBlockTable are inaccessible so I can't create the opportunity and go back to add data into those fields. How can I make blank fields editable in the table?
 
<apex:page standardController="Opportunity">
    <apex:form >
        <apex:pageBlock mode="inlineEdit">
             <apex:pageBlockButtons >
                <apex:commandButton action="{!edit}" id="editButton" value="Edit"/>
                <apex:commandButton action="{!save}" id="saveButton" value="Save"/>
                <apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel"/>
                </apex:pageBlockButtons>
            <apex:pageBlocktable value="{!Opportunity.Meal_Date_1__c}" var="Meal_Date_1__c">
                  <apex:column headerValue="Day 1">
                    <apex:inputfield value="{!Opportunity.Meal_Date_1__c}"/>
                    <apex:outputField value="{!Opportunity.Meal_Date_1__c}"/>
                </apex:column>
                <apex:column headerValue="Breakfast">    
                    <apex:inputField value="{!Opportunity.Breakfast_1__c}" />
                </apex:column>
                <apex:column headerValue="Lunch">
                    <apex:inputField value="{!Opportunity.Lunch_1__c}" />
                </apex:column>
                <apex:column headerValue="Dinner">
                    <apex:inputField value="{!Opportunity.Dinner_1__c}" />
                </apex:column>
                <apex:column headerValue="Time">
                    <apex:inputField value="{!Opportunity.Meal_Time_1__c}" />
                </apex:column>
                </apex:pageBlockTable>
                <apex:pageBlockTable value="{!Opportunity.Meal_Date_2__c}" var="Meal_Date_2__c">
                <apex:column headerValue="Day 2">
                    <apex:inputField value="{!Opportunity.Meal_Date_2__c}" />
                </apex:column>
                <apex:column headerValue="Breakfast">    
                    <apex:inputField value="{!Opportunity.Breakfast_2__c}" />
                </apex:column>
                <apex:column headerValue="Lunch">
                    <apex:inputField value="{!Opportunity.Lunch_2__c}" />
                </apex:column>
                <apex:column headerValue="Dinner">
                    <apex:inputField value="{!Opportunity.Dinner_2__c}" />
                </apex:column>
                <apex:column headerValue="Time">
                    <apex:inputField value="{!Opportunity.Meal_Time_2__c}" />
                </apex:column>
                <apex:inlineEditSupport event="ondblClick" 
                        showOnEdit="saveButton,cancelButton" hideOnEdit="editButton" />
                </apex:pageBlockTable>
                <apex:pageBlockTable value="{!Opportunity.Meal_Date_3__c}" var="Meal_Date_3__c">
                <apex:column headerValue="Day 3">
                    <apex:inputField value="{!Opportunity.Meal_Date_3__c}" />
                </apex:column>
                <apex:column headerValue="Breakfast">    
                    <apex:inputField value="{!Opportunity.Breakfast_3__c}" />
                </apex:column>
                <apex:column headerValue="Lunch">
                    <apex:inputField value="{!Opportunity.Lunch_3__c}" />
                </apex:column>
                <apex:column headerValue="Dinner">
                    <apex:inputField value="{!Opportunity.Dinner_3__c}" />
                </apex:column>
                <apex:column headerValue="Time">
                    <apex:inputField value="{!Opportunity.Meal_Time_3__c}" />
                </apex:column>
                <apex:inlineEditSupport event="ondblClick" 
                        showOnEdit="saveButton,cancelButton" hideOnEdit="editButton" />
                </apex:pageBlockTable>
                <apex:pageBlockTable value="{!Opportunity.Meal_Date_4__c}" var="Meal_Date_4__c">
                <apex:column headerValue="Day 4">
                    <apex:inputField value="{!Opportunity.Meal_Date_4__c}" />
                </apex:column>
                <apex:column headerValue="Breakfast">    
                    <apex:inputField value="{!Opportunity.Breakfast_4__c}" />
                </apex:column>
                <apex:column headerValue="Lunch">
                    <apex:inputField value="{!Opportunity.Lunch_4__c}" />
                </apex:column>
                <apex:column headerValue="Dinner">
                    <apex:inputField value="{!Opportunity.Dinner_4__c}" />
                </apex:column>
                <apex:column headerValue="Time">
                    <apex:inputField value="{!Opportunity.Meal_Time_4__c}" />
                </apex:column>
                <apex:inlineEditSupport event="ondblClick" 
                        showOnEdit="saveButton,cancelButton" hideOnEdit="editButton" />
                </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

Hi friends,

 

I have list of records,when i click the particular records it display the details of records.some records not display it's loading too long time after that am getting err like this.. Apex CPU time limit exceeded and An unexpected error has occurred. Your development organization has been notifiedwhy this err occur how to resolve this please can anyone help me..thanks in advance..

 

Regards,

kathir