Autofill price, depending on field in opportunity

Hello,

I have a, probably very simple, question.

I need a discount field in the opportunity module. I have come a long way and am stuck on the field "price". I introduced a new field named "Edition" in the opportunities. And I want the price field to be filled out automatically, based on the value set in "Edition".

Ex: 
Edition 1 --> 5€
Edition 2 --> 10€ 
Edition 3 --> 20€ 
etc.

This price will then be modified with the discountvalue and eventually print out the net price at the end. That's the theory. 

Right now I am just concerned about how to get the "price" field to be filled out automatically..

Looking forward to your replies and wish a happy wednesday to all.

Regards

Volkan

PS: There is a low amount of Editions. To be exact there are only 5.

Parents
  • Hi Volkan Deniz,

    There are multiple ways to automatically populate a field. If you are on Enterprise, you have SugarBPM process definitions and business rules to serve this goal. Alternatively, in any paid edition of Sugar, you have calculated field functionality.

    In my test instance of 9.0.0 Enterprise, I use the stock Likely(amount) field in place of your mentioned Price field.
    I made a custom DropDown type field called editions_c with a custom dropdown list: editions_list, which looks like this:

    Calculated Field idea

    1. In DropDown Editor, I build a dropdown list called edition_likely_list that I do not use in a field that has the same Item Names as the editions_list shown above, and the Display Labels are the values I want to populate Likely(amount) with. It looks like this:

    2. In Studio > Opportunities > Fields, in Likely(amount), I put the following calculation:

    getDropdownValue("edition_likely_list",$editions_c)

    SugarBPM idea (available in Enterprise)

    1. Having no calculation in the Likely(amount) field, I created a Business Rule targeting Opportunities that looks like this:

    2. I create an enabled Process Definition that targets Opportunities, reacts to new records with Edition populated and updates where Editions changes, and uses the Business Rule, as shown here:

    I hope this helps!

Reply
  • Hi Volkan Deniz,

    There are multiple ways to automatically populate a field. If you are on Enterprise, you have SugarBPM process definitions and business rules to serve this goal. Alternatively, in any paid edition of Sugar, you have calculated field functionality.

    In my test instance of 9.0.0 Enterprise, I use the stock Likely(amount) field in place of your mentioned Price field.
    I made a custom DropDown type field called editions_c with a custom dropdown list: editions_list, which looks like this:

    Calculated Field idea

    1. In DropDown Editor, I build a dropdown list called edition_likely_list that I do not use in a field that has the same Item Names as the editions_list shown above, and the Display Labels are the values I want to populate Likely(amount) with. It looks like this:

    2. In Studio > Opportunities > Fields, in Likely(amount), I put the following calculation:

    getDropdownValue("edition_likely_list",$editions_c)

    SugarBPM idea (available in Enterprise)

    1. Having no calculation in the Likely(amount) field, I created a Business Rule targeting Opportunities that looks like this:

    2. I create an enabled Process Definition that targets Opportunities, reacts to new records with Edition populated and updates where Editions changes, and uses the Business Rule, as shown here:

    I hope this helps!

Children
  • Hello Patrick McQueen,

    that did indeed help a lot. Thank you very much for those tips, especially, making the effort and demonstrating it with screens etc.

    I managed to do it by using the calculation you have written about.

    Finally I managed to set the "discount" area to only show, when the checkmark "discount" is aktive. When active, a few more fields show up, asking for the amount of discount. From there I went and made a calculation to print out the net price, after discount. 

    So yeah, thanks again, I have not been using sugar for a long time, but I am getting forward step by step

    Regards

    Volkan