With only Studio+BPM available, how can I copy a customised field from my Accounts record to the newly created opportunity record ?.

Hi there,

Probably fairly basic question, but without the use of PHP , so only Studio (+BPM)  available, how can I create a customised field on the account record (that part I know ;-) ) , to have that field copied over as initial value for another customised field on the opportunity record created as new opportunity for that account ?

Thanks

Hugo

  • HI  , 


    The easier way would be creating a new calculated field in the Opportunities module that would read from the Account module filed. 
    Something like this: 






    And the formula created would be something like this: 



    related($accounts,"test_custom_c")

    You'll have to mind that every time this field is changed on the Account Record, it will trigger a save() in every Opportunity related to that account to update the new field. 

    Depending on the amount of opportunities and number of times the field gets changed this can slow down performance quite a bit. 

    If due to that the solution is not adequate, you could also consider adding a dashlet in the opportunities Record view just showing the value of the field from the Parent account. 




    Let me know if this helps. 

    André  

  • Hi  André , thanks for the swift reply.

    The complication for my situation is however that the field in the opportunity record may only be taken over from the account record during creation of that opportunity, as a kind of initial value. If someone changes that field in the opportunity, that change should be preserved.

    With that in mind, any other ideas how I could solve that ? Maybe via BPM which allows to do something (set a field) only during the creation of a new opportunity... Any experience in that area ?

    Bye now

    Hugo

  • Hi Hugo,

    I had the same desire and solved it with a Business Rule that is triggered at record creation...  In my case, it was to add the "Customer Number" from the related Account Module to a Contact Record.  The process is only triggered at record creation if the field in the contact record doesn't contain a "-".

    Bud Hartley | Cape Foulwind, NZ (and Oregon, USA)

  • One additional thought - In my case, if a "creative User" changes the Account Relationship the field isn't updated by the process. The field in the Contact Module has "Audit" set so we can see the change if it happens and I have a second process that alerts me if the field is changed.

    Bud Hartley | Cape Foulwind, NZ (and Oregon, USA)

  • Hello  , 

    A similar requirement was brought up here in the past. 
    At that time I suggested an approach using a SetValue dependency _that is very similar to a calculated field.
    Adding on that you would create a checkbox field in the Opportunity that you can use to make the field editable when a user decides to override the calculated value: 

    This was the post: 

    RE: Is it possible to overwrite calculated fields? 

    This however, it will need to be installed in the instance via a Module Loader Package. _
    Let me know if you would like to give it a try and I can draft the dependency for you for a first test. 

  • Hi Bud and Andre,

    Back from an extended seasons holiday ;-)

    First of all , my best wishes for 2024 : good health and job satisfaction but above all hapiness for you and all the ones that deserved that special place in your heart.

    Thanks for your inputs, i'll give it a try soon.

    Bye now

    Hugo