How to Remove M2M Relationship ?

Pandimeena R
Mega Contributor

Hi,

I want to Remove already created M2M Relationship for the Tables and again i have to create the M2M relationship with New Tables by using Business Rules.

If any one can Explain?

 

By,

Meena

9 REPLIES 9

Hussain Kachwal
Mega Guru

Hello Meena,

There is an ACL defined on delete operation for the M2M (sys_m2m) table which you need to deactivate before you can delete your M2M definition relationship table.

The only way to delete the m2m entry is to disable the security ACL on the 'sys_m2m' table first.

You may refer the below link in order to create the M2M relationship:

https://www.servicenowguru.com/system-definition/relationships/creating-manytomany-relationship-servicenowcom/

 

Kindly mark as Answered or Helpful, if applicable.

-Hussain K

Hi Hussain,

Thanks for your Reply.

I want to write Business Rules because at a time I have to remove the Old M2M Relation and Again i have to create a new M2M Relation.

Can you explain How to write the Business Rule for this?

SaiRaviKiran Ak
Giga Guru

Hi,

As far as I know, It should be better that you can delete the existing M2M relationship manually and then create new M2M on your required table.

To delete the M2M relationship : there is an ACL defined for it on delete operation for M2M (sys_m2m) table, which you need to deactivate before you can delete your M2M definition relationship table

 

Make sure that you have to activate the ACL after you are done with the deletion.

 

Thanks,

Ravi

Thanks Ravi....

I have to delete the M2M relation based on the Status Change. So I have to Create the Business Rules.

Do you have any idea about yhis?