addDays

Hi guys, 

I was adding a new field 'target acknowledge date' and this field would be dependent on when the record is created (date_created). Target ack date should have a default value of a day added to the date record was created. 

I was trying to write a formula using the function addDays, but it somehow is consistently giving me some Boolean error. Does anyone know how this could be resolved?

  • hi  

    The formula work fine for me

    Fullscreen
    1
    addDays($date_created,1)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    .

    CRM Business Consultant

  • I tried the same, and I keep on getting the error 'The formula must be of Type Boolean'

  • Hi  -

    It sounds like you're wanting to control the visibility of a field ( target acknowledge date ) based on the result of the formula. Is that correct? If so, the dependent formula must evaluate to either true or false as indicated by the error. Let me know if my understanding here is correct. Also, if possible, provide the exact formula that you are attempting to use. You may just need to add an ifElse to the formula to properly evaluate to true or false.

    Thanks,
    Shawn

  • Hi  ,

    You cannot use Sugar Logic to set a default value for a field if you want that field to also be editable by users. Sugar Logic formulas make a field read-only. Instead, you should use the 'Default Value' option to set it to 'tomorrow':

    Alternatively, you could also use SugarBPM to set the value on newly created records to the following day if users don't set a date when creating the record.

    Chris

  • Dear Shawn,

    At the moment, date_created is the field that is automatically added when the record in the Cases Module is created. 

    I am trying to create a target date for acknowledging the email from the customer for the case. So if the field is created on 23/09/2024, I want the target acknowledgement date to autopopulate to 25/09/2024 

    I tried the formula addDays($date_created,1), and I get the Boolean error. I am still stuck here. 

  • Thank you for this Chris. I shall give this a try. 

  • I've figured this out. Turns out I was just over complicating things by trying to use a function instead of just setting the Default value to tomorrow. Hahha This is what happens when you always think of complicated solutions haha