Calculated field disappears after saving the record

Hi there,

I wanted to achieve the following : 

Our account records have a default solution architect (SA) picked from the Users module via Releated field.

When an opportunity is created , we want to take the choosen SA from the account as initial SA for the opportunity.

However, the user is allowed to change that opportunity SA afterwards.

So I've added a calculated text field Solution Achitect Ini to store the SA from the account.

(formula used is related($accounts,"solution_architect_c"))

The SA DOES appear during opportuntiy creation, but is erased when saving the opportunity.

How can I prevent this ?

My next step I planned was to create a User module based related field (Opportunity Solution Architect) on the opportunity and take the above mentioned field as default.

The ini field will stay hidden, The Opportunity Solution Architect field will be shown.

Am I on the correct track to achieve this ?

(I only have Studio and BPM available, PHP and the like is beyond my expertise)

Thanks for your assistance,

Hugo

Parents
  • Hi ,

    I had a similar need, and just having the field set for Audit wasn't satisfactory.  My solution probably isn't the best approach, but it works for me.

    I created a separate text field for the original value named "Initial Assignment", and I have a BPM copy the value from the related field for New Records Only (with a one minute delay after record creation).  In the Roles I set the field as Read-Only.

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

  •   

    Hi Bud, I was wondering , 1 minute after record creation, does that mean after the new record appears on screen of after hitting Save ? In general, how does the time line for SugarCRM looks like ?

    When I start a new records the sequence is :

    1. all calculated fields are immediately calculated
    2. then all depending conditions in that record are evaluated
    3. all manual selections and inputs are done
    4. after hitting save SugarBPM evaluates if a process must be started (new record ? new and existing records ?, etc...)
    5. if the process encounters a timer, that timer is then started.
    6. when the timer has finished , the subsequent action is executed (what if there is a parallel gateway with a branch that completely kills the process before the timer ends ? )

    Is my assumption correct ?

    Bye now

    Hugo

  • Hi ,

    I'm sorry for the slow response.

    The "main" process is set for new records and all updates since it has multiple fields, and it triggers for other things that may change.  There are multiple parallel paths in the main process, and it normally finishes within less than a minute.  Since the default for record assignment defaults to the creator, the main BPM includes logic to set the assignment to the proper owner (and the correct Team).

    I could have included logic in the main process to copy the assigned user field to the text field, but since the process can be triggered for changes, I was lazy and didn't want to code the gateway logic for determining if the field should be copied.  I opted to make it a separate process that triggered on new records only.  The simple BPM logic is: Start-wait-copy-end. 

    P.S. I know that you can set the run order for multiple processes on the same record... I opted for a timer instead.

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

Reply
  • Hi ,

    I'm sorry for the slow response.

    The "main" process is set for new records and all updates since it has multiple fields, and it triggers for other things that may change.  There are multiple parallel paths in the main process, and it normally finishes within less than a minute.  Since the default for record assignment defaults to the creator, the main BPM includes logic to set the assignment to the proper owner (and the correct Team).

    I could have included logic in the main process to copy the assigned user field to the text field, but since the process can be triggered for changes, I was lazy and didn't want to code the gateway logic for determining if the field should be copied.  I opted to make it a separate process that triggered on new records only.  The simple BPM logic is: Start-wait-copy-end. 

    P.S. I know that you can set the run order for multiple processes on the same record... I opted for a timer instead.

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

Children
No Data