Formula

I can't get the formula right, please can I ask for some help!!! 

We create our leads and need to record the company who has referred it to us.  We save these companies as accounts and with the "type of contact" from a drop down menu as "broker".   I have been trying to put together a formula on a relate field but am getting every error possible and I am at the point where I can't see the wood for the trees.  

Is this possible to do with a formula?  If there's another way to do the same thing, I'm open to suggestions :-) 

Thanks 

Rachel 

  • Hi Rachel,

    Are you trying to filter the options you can choose in the relate field by the criteria you listed (i.e. where 'Type of Contact' equals 'Broker')? If so, that is not possible to do with a Sugar Logic formula. Applying a predefined filter to a relate field is only possible via custom code at this time. The developer guide has examples on how to apply filters to the type-ahead search in a relate field as well as the search drawer when attempting a more extensive search within the same field.

    Chris

  • Hi Chris, thank you so much. I'll have a look at the custom code side of it in my sandbox.  

    Just to pick your brains for another minute, can you think of a work around I could try without messing with the code? 

  • Hi  ,

    If your goal is to provide an simple UX for your users (i.e. they can confidently search for and select brokers quickly), then the custom code is the only option I can think of at this time. One thing that may help in making it easier is the https://github.com/LampadaGlobal/enum-api package from  . It's not clear if that is still supported for current versions of Sugar though and he will be best to comment on whether it would help with your use case.

    If your main goal is to ensure only broker accounts are related to the lead, then you can use Sugar Logic to meet that need. The field relating the account to the lead would need to be a relationship field (i.e. one-to-many or one-to-one relationship deployed via Studio) and not a relate field. Relate fields cannot be used with Sugar Logic for these types of validation. Let me know if this is the way you want to go and I can provide more insight.

    Chris

  • Thank you for enjoying and recommending enum-api.

    Yes, it works on the latest version (14.1).

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Thank you so much for your help.