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
PkPk 

How do I make Flow for the following question:?

When Contact's object records are updated, "Number of Updates" field will be updated as follows:
The field should count the number of clicks on the "save" button in a specific contact record. Meaning, in every update, 1 will be added to the field's last value (every update: +1), For example:
Number of Updates = 5
After saving the Contact's record, "Number of Updates" field value becomes 6
and so on.
Best Answer chosen by Pk
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Patrick,

The flow should be record Triggered flow on Contact object.

The flow start element will be as below.

User-added image
Create a resource of type formula with return type as Number the formula will be as below.

Formule would be as below 
IF(ISBLANK({!$Record.Number_of_Updates__c}), 1, {!$Record.Number_of_Updates__c}+1)


User-added image
Add a element update triggered record and add as below.

User-added image

I am checking the feasibility of calling screen flow from this flow and post the same.

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Patrick,

You mean if user does not update any field and just edit the record and save it then also do we need to increment the number?

Thanks,
 
PkPk

yes

It will count How many time he click on "Save" button

Thank you

PkPk
In addition, is it possible to connect another FLOW to it that displays a screen that reads "In this record the button "Save" was pressed x times" meaning that this FLOW will activate a screen Flow?

Or is it already a complicated matter?
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Patrick,

The flow should be record Triggered flow on Contact object.

The flow start element will be as below.

User-added image
Create a resource of type formula with return type as Number the formula will be as below.

Formule would be as below 
IF(ISBLANK({!$Record.Number_of_Updates__c}), 1, {!$Record.Number_of_Updates__c}+1)


User-added image
Add a element update triggered record and add as below.

User-added image

I am checking the feasibility of calling screen flow from this flow and post the same.

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
This was selected as the best answer
PkPk
moment
Please show me the flowchart of the FLOW
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Patrick,

Please find the below flow.

User-added image
Thanks,
 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Patrick,

We cannot call a screenflow from record triggered flow or autolauched flow because of which we may not be able to achieve it.

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
PkPk
So I think differently, is it possible to make a Flow that when you click the "Save" button it displays the value of the "number of update" field and on this screen I record the text, this record has been pressed X times "Save"
?
PkPk

Hello Sai,

You are really right, there is no need for FLOW screen

I put here a link to another question if possible your assistance.

https://developer.salesforce.com/forums/ForumsMain?id=9062I000000UiiS#!/feedtype=SINGLE_QUESTION_DETAIL&dc=Trailhead&criteria=OPENQUESTIONS&id=9062I000000UinrQAC


And I would also like to ask you, how can I go deeper and learn more about the topic of FLOW? And the formulas?

Thank you very much in advance,

bless you