Question: How To Create A Sugar Logic Formula For AutoIncrement Field

Hello, is there a way to be able to create a Sugar Logic Formula that includes the AutoIncrement field?

Sample Setup:

  • Field #1:
    • Text Field
    • Value: Name
  • Field #2:
    • AutoIncrement Field
    • Value: 150
  • Field #3:
    • Text Field
    • Sugar Logic Formula Enabled
      • Formula: Field #1-Field #2
    • Value: Name-150

Problem:

  • It seems the Auto-Increment field isn't selectable on the Sugar Logic formula window. Are there any alternative formula I can use?

    Kindly advise, thank you everyone.
Parents
  • Auto Increment fields are set at the database layer once DB Manager has control over its iterator, so such a field only will be populated after the very record is saved into db. Having said that, even if you were able to select an auto increment field inside a sugarLogic formula, its value would be empty once SugarCRM has no control over its very value.

    So the unique suitable approach is to implement a LogicHook after_save.

    Cheers

    André Lopes
    Lampada Global
    Skype: andre.lampada
Reply
  • Auto Increment fields are set at the database layer once DB Manager has control over its iterator, so such a field only will be populated after the very record is saved into db. Having said that, even if you were able to select an auto increment field inside a sugarLogic formula, its value would be empty once SugarCRM has no control over its very value.

    So the unique suitable approach is to implement a LogicHook after_save.

    Cheers

    André Lopes
    Lampada Global
    Skype: andre.lampada
Children