• Tushar Arora 26
  • NEWBIE
  • 20 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 5
    Replies
I was reading the following document regarding "Field Updates That Re-evaluate Workflow Rules"

https://help.salesforce.com/articleView?id=workflow_field_updates_reevalute_wf.htm&type=0
There is one point mentioned in this document that
"In a batch update, workflow is only retriggered on the entities where there is a change."
So what is meant by this ? Can anyone please give me an example to explain this ? Thanks
Hi, I was reviewing one of my debug logs and I found that my debug logs are coming in the following way for one of my person account records. You can notice that CODE_UNIT_FINISHED is missing from the debug logs. Ideally, before trigger code unit must finish before running validation or before running after update trigger by using "CODE_UNIT_FINISHED" in the debug logs. Do you have any idea why "CODE_UNIT_FINISHED" is missing from the debug logs ?
 
CODE_UNIT_STARTED | AccountTrigger on PersonAccount trigger event BeforeUpdate for [0019E00000C8dR9]
.
CODE_UNIT_STARTED|[EXTERNAL]|Validation:PersonAccount:0019E00000C8dR9
.
CODE_UNIT_STARTED | AccountTrigger on PersonAccount trigger event AfterUpdate for [0019E00000C8dR9]
.
CODE_UNIT_STARTED|[EXTERNAL]|Workflow:Account

Although, after a workflow field update gets fired, then triggers run again. This time I am able to see the  CODE_UNIT_FINISHED log as expected. 
 
CODE_UNIT_STARTED | AccountTrigger on PersonAccount trigger event BeforeUpdate for [0019E00000C8dR9] . 
CODE_UNIT_FINISHED | AccountTrigger on PersonAccount trigger event BeforeUpdate for [0019E00000C8dR9] 
CODE_UNIT_STARTED | AccountTrigger on PersonAccount trigger event AfterUpdate for [0019E00000C8dR9] . 
CODE_UNIT_FINISHED | AccountTrigger on PersonAccount trigger event AfterUpdate for [0019E00000C8dR9]

Does anyone have any idea, why it may happen ? Thanks
Hi, on my account object, I created a picklist field - testPicklist1__c. The picklist field has various values in it. One picklist value is "abc t" & its API name is "abc". I retrieved the Account object using ANT & tried to deploy to another Salesforce org using ANT. I got the below error message -:
User-added image
Error Message says -:  "Picklist value: abc t in picklist: testPicklist1__c not found". 

When I viewed the Account.object file I found that under "testPicklist1" field definition, the picklist value is shown with full name "abc" like this <fullName>abc</fullName> as shown below -:    
<fields>
        <fullName>testPicklist1__c</fullName>
        <externalId>false</externalId>
        <label>testPicklist1</label>
        <picklist>
            <picklistValues>
                <fullName>abc</fullName>
                <default>false</default>
            </picklistValues>  
        </picklist>
</fields>

Wheras in "AOC" record type definition under the enabled picklist value, this picklist is being referenced using "abc t" as the full name like this <fullName>abc t</fullName> as shown below -:
<recordTypes>
        <fullName>AOC</fullName>
        <active>true</active>
        <label>AOC</label>
       <picklistValues>
            <picklist>testPicklist1__c</picklist>
            <values>
                <fullName>abc t</fullName>
                <default>false</default>
            </values>
     </picklistValues>
</recordTypes>
Is this what causing the above error ? How can I remove this error & deploy successfully without manually doing changes ? Thanks in advance. 
 
Hi, on my account object, I created a picklist field - testPicklist1__c. The picklist field has various values in it. One picklist value is "abc t" & its API name is "abc". I retrieved the Account object using ANT & tried to deploy to another Salesforce org using ANT. I got the below error message -:
User-added image
Error Message says -:  "Picklist value: abc t in picklist: testPicklist1__c not found". 

When I viewed the Account.object file I found that under "testPicklist1" field definition, the picklist value is shown with full name "abc" like this <fullName>abc</fullName> as shown below -:    
<fields>
        <fullName>testPicklist1__c</fullName>
        <externalId>false</externalId>
        <label>testPicklist1</label>
        <picklist>
            <picklistValues>
                <fullName>abc</fullName>
                <default>false</default>
            </picklistValues>  
        </picklist>
</fields>

Wheras in "AOC" record type definition under the enabled picklist value, this picklist is being referenced using "abc t" as the full name like this <fullName>abc t</fullName> as shown below -:
<recordTypes>
        <fullName>AOC</fullName>
        <active>true</active>
        <label>AOC</label>
       <picklistValues>
            <picklist>testPicklist1__c</picklist>
            <values>
                <fullName>abc t</fullName>
                <default>false</default>
            </values>
     </picklistValues>
</recordTypes>
Is this what causing the above error ? How can I remove this error & deploy successfully without manually doing changes ? Thanks in advance. 
 
I have a process builder that is creating detail records and populating a few fields on creation. I also have an after insert trigger that is firing based on one of the fields that is populated during the record creation in the process builder.  Both function perfectly independently but when a record is created through the process builder that should fire the trigger it does not.  Any ideas or resources would be greatly appreciated since I'm new to triggers?

I have a site that I we have created that the forgot password link is not working.  When you put in the username and click submit, it just sits there.  The ForgotPassword Confirm page does not display nor does the email get sent.  This is the standard Forgot Password pages and controller that was built when the site was created so they are standard pages. 

 

Any help is greatly appreciated.  This is an urgent project we are trying to roll and it's driving me insane.

 

Code for the page is here. 

 

<apex:page id="Registration" showHeader="false" controller="ForgotPasswordController" title="{!$Label.site.forgot_password}">

<apex:stylesheet value="{!URLFOR($Resource.CP_Site_Resources, 'main.css')}"/>




    <apex:composition template="CPSiteTemplate">


        <apex:define name="body">

            <div id="mainouter">
                
                <div id="maininner" align="center">
                    
                  <apex:form id="theForm" forceSSL="true">
                    <apex:panelGrid columns="2" style="margin-top:1em;">
                      <apex:outputLabel value="{!$Label.site.username}" for="username"/>
                      <apex:inputText required="true" id="username" value="{!username}"/>
                      <apex:commandButton id="submit" value="{!$Label.site.submit}" action="{!forgotPassword}"/>
                    </apex:panelGrid>
                    </apex:form>                  
                   <!-- Closing maininner Div here -->
                </div>
 
            <!-- closing mainouter Div here -->    
            </div>                     
 
 
        </apex:define>


  </apex:composition>





</apex:page>

 

 

 

/**
 * An apex page controller that exposes the site forgot password functionality
 */
public class ForgotPasswordController {
    public String username {get; set;}  
    
 
       
    public ForgotPasswordController() {}
    
    public PageReference forgotPassword() {
        boolean success = Site.forgotPassword(username);
        PageReference pr = Page.ForgotPasswordConfirm;
        pr.setRedirect(true);
        
        system.debug(success);
        
        if (success) {              
            return pr;
        }
        return null;
    }
    
     public static testMethod void testForgotPasswordController() {
        // Instantiate a new controller with all parameters in the page
        ForgotPasswordController controller = new ForgotPasswordController();
        controller.username = 'test@salesforce.com';        
    
        System.assertEquals(controller.forgotPassword(),null); 
    }
}