• Balázs Rubicsek
  • NEWBIE
  • 15 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
Hello
I have a process builder process which executes on a field update. After the first criteria evaluation I execute 3 actions

1.1 Invoke Email by Invocable Apex
1.2 Standard Field Update
1.3 Standard Email Alert

After the 1st criteria the process does not stop it evaluates the 2nd critera and it should execute 3 actions

2.1 Invoke Email by Invocable Apex
2.2 Standard Field Update
2.3 Standard Email Alert

User-added image

If I do the field update to meet criteria 1 but not criteria 2
all actions are executed which belong to the criteria (1.1,1.2,1.3)
Works fine!

If I do the filed update to meet criteria 2 but not criteria 1
all actions are executed which belong to the criteria (2.1,2.2,2.3)
Works fine!

If the field update meets criteria 1 AND 2 then the standard actions are executed (1.2,1.3,2.2,2.3) but ONLY ther first apex criteria is launched (1.1) and the second is completely ignored (2.1).

The apex action is only executed once which is wrong.

In the debug log there is NO apex exception.

And as the standard field updates/email alerts are executed it is sure that both criterias are met and considered by SF.

The problem is that the apex invoke is only launched once.
Has anyone had this problem before?
Please help.




 
Hello
I have a process builder process which executes on a field update. After the first criteria evaluation I execute 3 actions

1.1 Invoke Email by Invocable Apex
1.2 Standard Field Update
1.3 Standard Email Alert

After the 1st criteria the process does not stop it evaluates the 2nd critera and it should execute 3 actions

2.1 Invoke Email by Invocable Apex
2.2 Standard Field Update
2.3 Standard Email Alert

User-added image

If I do the field update to meet criteria 1 but not criteria 2
all actions are executed which belong to the criteria (1.1,1.2,1.3)
Works fine!

If I do the filed update to meet criteria 2 but not criteria 1
all actions are executed which belong to the criteria (2.1,2.2,2.3)
Works fine!

If the field update meets criteria 1 AND 2 then the standard actions are executed (1.2,1.3,2.2,2.3) but ONLY ther first apex criteria is launched (1.1) and the second is completely ignored (2.1).

The apex action is only executed once which is wrong.

In the debug log there is NO apex exception.

And as the standard field updates/email alerts are executed it is sure that both criterias are met and considered by SF.

The problem is that the apex invoke is only launched once.
Has anyone had this problem before?
Please help.




 
Hi,

I'm currenty trying to master this use case:
Lets say we have an object and on the page we have the option to delete this object. Now the delete button gets clicked and a bootstrap modal pops up asking if this object really should be deleted. By clicking yes the object gets deleted.

My problem is to remember this clicked object so I know which one has to be deleted by clicking the modal yes button. 
So in a nutshell ... how can I pass the object id to a component parameter when the delete button gets clicked?

Thank you!
When you include a chatter feed and combine that with a rerender of a pageBlock, the CSS becomes doubled up causing some strange visual issues.  Consider the following Test page.

<apex:page standardController="Project__c" extensions="Test_Controller">
    <chatter:feedWithFollowers entityId="{!project.Id}" />
    <apex:form>
        <apex:pageBlock id="pageBlock">
            <apex:pageBlockButtons location="top" id="buttons">
                <apex:commandButton id="newButton" value="New" />
                <apex:commandButton action="{!nothing}" id="saveButton" value="Save" style="display:none;" rerender="pageBlock"/>
                <apex:commandButton action="{!cancelEdit}" id="cancelButton" value="Cancel" style="display:none;" rerender="pageBlock"/>
            </apex:pageBlockButtons>
            <apex:outputField value="{!project.Name}">
                <apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="newButton" event="ondblclick" resetFunction="resetInlineEdit"/>
            </apex:outputField>
        </apex:pageBlock>
    </apex:form>
</apex:page>

This is the controller:

public with sharing class Test_Controller {
    
    private String projectId { get; set; }
    public Project__c project { get; set; }
    
    // constructor
    public Test_Controller (ApexPages.StandardController controller) {
        projectId = controller.getId();
        initProject();
    }
    
    public void initProject() {
        project = [select Id, Name from Project__c where Id = :projectId];
    }
    
    // cancel inline edit
    public PageReference cancelEdit() {
        initProject();
        return null;
    }
    
    // do nothing
    public PageReference nothing() {
        initProject();
        return null;
    }
}

Go to the page and specify the Id of one of your projects.  Double click to change the Name, put in some new text, click somewhere else, then click Cancel.  You'll notice the rerender causes the CSS to break for the App selector (top-right) and the "Create New..." button in the sidebar.