0

I am trying to set the RelatedTo field of activity to search in a custom object. In classic we can simply use URL hacking & custom button. But in lightning this solution is not viable. I tried few ideas to set default value but to no avail. By default Related To has Accounts...Also I know there is an Idea Pending with salesforce.

enter image description here

So if anyone know ANY way to set "Related TO" field on Activity please let me know. Is visualforce page/ lightning component to replicate the whole Activity section ..the only option?

Thanks for your time:)

1

This looks like an action. Actions allow you to set the default value of fields on the layout.

https://support.salesforce.com/apex/HTViewHelpDoc?id=predefined_field_values.htm

Click the name of an action in the Buttons, Links, and Actions list or the Global Actions list. On the action detail page, click New in the Predefined Field Values list. Select the field you want to predefine a value for. Specify the value for the field. For single-select picklists, you can specify both a specific value and a formula value. If you set both, the formula value takes precedence over the specific value. Click Save.

  • 1
    The field itself can also be removed from the layout, with or without a defaulted value. – David Reed Aug 3 '18 at 19:23
  • Correct, I think I had a bit of macro on the mind because macros do require the fields on the layout. – gNerb Aug 3 '18 at 19:27
  • Thanks for your comment....I am aware about the action...but in this situation that won't work. Reason being using Action we can set value of any field to some value....i.e. Field A = 'xyz'. But we don't want to set value of field "Related To" itself. We just want it to search in Another objects by default .....& not search in Account always. Please see image from question. – Dnyaneshwar Aug 3 '18 at 19:30
  • Also i don't want to remove it from layout.....hows that going to solve the problem – Dnyaneshwar Aug 3 '18 at 19:38
  • Please edit your question to be clearer about your objective, @Dnyaneshwar. Right now, you're explicitly asking how to set the field, not how to change the default lookup search behavior. – David Reed Aug 3 '18 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.