function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sumant KuchipudiSumant Kuchipudi 

Process builder not triggering on creating record.

I have a custom Address object, which has address fields, phone, and email fields. I'm wriging Process Builder on this object, with the following steps
1) Start the process, when a record created or edited
2) criteria.:
      Criteria for Executing Actions: Formula Evaluates to True
The formula should be on fields (Street, City , state, zipcode), one of these created, edited only the Process should trigger but when I create with these its not triggering. below is the formula I'm using. Its working when edited the record.
AND(
 OR(
    AND(NOT(ISBLANK([Address__c].Street__c)),ISCHANGED([Address__c].Street__c)), 
    AND(NOT(ISBLANK([Address__c].State__c)),ISCHANGED([Address__c].State__c)), 
    AND(NOT(ISBLANK([Address__c].City__c)),ISCHANGED([Address__c].City__c)), 
    AND(NOT(ISBLANK([Address__c].ZipCode__c)),ISCHANGED([Address__c].ZipCode__c)), 
    AND(NOT(ISBLANK([Address__c].Country__c))ISCHANGED([Address__c].Country__c))
   )
)




 
sowmya Inturi 9sowmya Inturi 9
Hi Sumant,
When you create a record you will have null value in that field. And when it goes to this condition 
AND(NOT(ISBLANK([Address__c].Street__c)),ISCHANGED([Address__c].Street__c)),
ISCHANGED([Address__c].Street__c) - Condition will not satisfy for the new record as the field is not changed at the beginning (Creation time). So it would become false. As it is a AND condition, The whole AND(NOT(ISBLANK([Address__c].Street__c)),ISCHANGED([Address__c].Street__c)) will become false. Thus it doesn't meet he criteria and process builder doesn't fire.

Let me know if you have any queries!

Thanks,
Sowmya.
Sumant KuchipudiSumant Kuchipudi
Hi Sowmya, thanks for your reply. What could be the satisfied condition for new record?
sowmya Inturi 9sowmya Inturi 9
Hi Sumanth,
You can try like this:
OR(
       AND(
              OR( AND(NOT(ISBLANK([Address__c].Street__c)),ISCHANGED([Address__c].Street__c)),ISNEW([Address__c].Street__c)),                                  OR( AND(NOT(ISBLANK([Address__c].State__c)),ISCHANGED([Address__c].State__c))ISNEW([Address__c].State__c)),                                      OR(AND(NOT(ISBLANK([Address__c].City__c)),ISCHANGED([Address__c].City__c)),ISNEW([Address__c].City__c)),                                              OR(AND(NOT(ISBLANK([Address__c].ZipCode__c)),ISCHANGED([Address__c].ZipCode__c)),ISNEW([Address__c].ZipCode__c)),                        OR(AND(NOT(ISBLANK([Address__c].Country__c)),ISCHANGED([Address__c].Country__c)),ISNEW([Address__c].Country__c))
              )
)


Thanks,
Sowmya.
Sumant KuchipudiSumant Kuchipudi
Hi Sowmya,

I have tried with the following formula but this time when the new record creates then only its triggering. 
OR(
    AND(
        OR(AND(NOT(ISBLANK([Address__c].Street__c)), ISCHANGED([Address__c].Street__c)), ISNEW()), 
        OR(AND(NOT(ISBLANK([Address__c].State__c)), ISCHANGED([Address__c].State__c)), ISNEW()), 
        OR(AND(NOT(ISBLANK([Address__c].City__c)), ISCHANGED([Address__c].City__c)), ISNEW()), 
        OR(AND(NOT(ISBLANK([Address__c].ZipCode__c)), ISCHANGED([Address__c].ZipCode__c)), ISNEW()), 
        OR(AND(NOT(ISBLANK([Address__c].Country__c)), ISCHANGED([Address__c].Country__c)),ISNEW())
    )
)

Probably I might have mssed something in my original question.

I need to trigger this Process Builder when one of theese address fields (street, city,st,zip) touched to the record only, not other fileds like (Email, Phone, etc..).
 
Sumant KuchipudiSumant Kuchipudi
I was able to make it to working with the below formula rule, now its triggering when address related fileds changed with new/upadate record.
 
OR(
	AND(
        ISNEW(),
        OR(
            NOT(ISBLANK([Address__c].Street__c)),
            NOT(ISBLANK([Address__c].State__c)),
            NOT(ISBLANK([Address__c].City__c)),
            NOT(ISBLANK([Address__c].ZipCode__c)),
            NOT(ISBLANK([Address__c].Country__c))
        )
    ),
    OR (
        ISCHANGED([Address__c].Street__c), 
        ISCHANGED([Address__c].State__c), 
        ISCHANGED([Address__c].City__c), 
        ISCHANGED([Address__c].ZipCode__c), 
        ISCHANGED([Address__c].Country__c)
    )
)


Thanks Sowmya for spending time on my issue and clues were helped me to resolve this.