How to make custom relationship field required only for when user click on create view not record view using js file

Hi All,

We have made custom relationship field on accounts module non required as we don't want field to be required while converting lead on lead conversion page but we want field when create account using create button.
Can anyone suggest, how to make custom relationship field required only for when user click on create view not record view?
How to make field required using js?

Kindest Regards,
Shreya

Parents Reply Children
  • Hi ,

    I fear I'm still not fully understanding the scenario. This is what it seems to be:

    1. You have the custom module (Module X)
      1. Module X is part of your lead conversion flow
      2. Module X has a many-to-1 relationship to the Client (Accounts) module
      3. With the solution I provided, the Client relationship field is not required for the Module X record during lead conversion but is required when creating a Module X record elsewhere
      4. You want that same field on Module X to not be required when creating a Module X record from the Module X subpanel of a Client record

    Is that correct? If so, I am having trouble understanding the validity of this use case. When creating a Module X record from the Module X subpanel of a Client record, the relationship field should be automatically populated with the current Client record in order to establish the relationship. If you were to delete the pre-filled value in that field, it would be required due to the solution implemented, but again, I don't understand why that would be a desirable workflow.

    If I am misunderstanding, please provide more specific information. Actual module names, system field names you are working with, and screenshots are helpful and can help pinpoint where the misunderstanding is.

    Chris

  • Dear Chris,

    You are right, When creating a Module X record from the Module X subpanel of a Client record, the relationship field should be automatically populated with the current Client record in order to establish the relationship.

    But I have another module custom relationship with Module X and I want to make that as non mandatory when user creating Module X record from the Module X subpanel of a Client record.

    Hope you have understood now.

    Kindest Regards,

    Shreya

  • Dear Chris,

    Can you please suggest?

    Kindest Regards,

    Shreya

  • Hi ,

    Modifying field requirement based on creating a record from a subpanel is something that would require development. I'm not best-suited to answer that solution as I am not a developer. I recommend creating a new topic for that issue since it is different than the initial issue presented in this conversation. 

    Chris