Skip to main content

For example, if I chose Opportunity type as "project" then the Project Name (auto number field) would populate a number but if I chose "standard" as my opportunity type then the Project name would remain blank. Any help is greatly appreciated!

2 件の回答
  1. 2022年1月17日 20:59

    @Bella Cotrone Hello,

     

    You can keep the auto number somewhere in your instance and increase one whenever an opportunity is created and set the name using text formula.

     

    You can either keep the number in another object or custom metadata. If I were you, I would choose another object because it is easier.

     

    1. Create another object and create one number field in this object. 

    2. Create one record and set the number field as 1.

    3. Create your Opportunity Record Triggered flow. If the record type is project, get the record from the object you created and get the number field which is 1. Assign the name with a text formula. The text formula can be something like this P- + TEXT(Numberfield). At the end of your flow, add one to the number field which will be 2 and update the name of the opportunity. If another opportunity is created with a project record type it will get the number field which is two and will be P-2 and so on.

    4. Set the name field on the project page layout as read only.

    5. In case of a record type change, set the name Unnamed or something else with a text formula.

     

    If you need help with this flow and configurations, just message me.

     

    As a side note: this object should be public and all users need access to. You don't need to add it to your app just make sure that they can get it as well as you do.

0/9000