Disable add action on table for M2M

Whenever M:M grid is added to the form view the Add is always present

This is when no item added

This is when at least one item is added

In my case addition of item is implemented by separate rule using "create new related record with relationship" .

In my context the add action will lead wrong relationship because this out of box action is equivalent to "create relationship"

So I dont want "Add" to appear or at least it should be disabled.

What is a way to achieve this?

Best regards,

Uday Joshi

Parents
  • 0  

    Hi Uday,

    There is no ability to remove the add menu item from the form once you've added a Many2Many association to the Records Form. What you can do is control who has the ability to edit the records using business rules.

    For instance you could have a validation rule that prevents a user from creating a new relationship. So even though they click add and choose the Request to be added when the system tries to save this is prevented and an error message is shown based upon the criteria you set say they are part of a particular group or something similar.

    It's worth referring to the following doc link about validation rule:

    OpenText Documentation Portal (microfocus.com)

    Also take a look at what you can do around using the following expression for Many2Many:

    Thanks,

    Dave

Reply
  • 0  

    Hi Uday,

    There is no ability to remove the add menu item from the form once you've added a Many2Many association to the Records Form. What you can do is control who has the ability to edit the records using business rules.

    For instance you could have a validation rule that prevents a user from creating a new relationship. So even though they click add and choose the Request to be added when the system tries to save this is prevented and an error message is shown based upon the criteria you set say they are part of a particular group or something similar.

    It's worth referring to the following doc link about validation rule:

    OpenText Documentation Portal (microfocus.com)

    Also take a look at what you can do around using the following expression for Many2Many:

    Thanks,

    Dave

Children
  • 0 in reply to   

    Hi Dave,

    Thanks for the suggestion. 

    Let me try to see whether it serves my requirement.

    Regards,

    Uday

  • 0 in reply to   

    If I put any validation rule, it prevents my own custom rule from execution.

    Also when I enter ${current_association_update.association_name it does not show color of recognized command so not this is really accpetable. Unfortunately documentation is quite deficient in this respect.

    I have a rule create new related record with relationship 

    The OTB 'Add' gives option to choose an item from dropdown and adds it means internally it is create relationship  for existing record. This is unacceptable in my scenario. 

    My requirement is whenever relate an item , it is created and linked. Linkig existing is not permissible

    On my form if I choose Add spare , it Create record with relationship

    where as if I click "Add" then it is create link with existing spare record which is not acceptable because it is already linked to another record

    Though issue is not resolved as expected. Anyways thanks for the suggestion.

    Uday