Issue whie creating Edit button

Lusifer1984
Tera Contributor

I 'm trying to figure out how to use the sys_m2m_template.do slush bucket.  I see from some of the other 'Edit...' UI actions, that many use this:

var uri = action.getGlideURI();
var path = uri.getFileFromPath();
uri.set('sysparm_m2m_ref', current.getTableName());
uri.set('sysparm_stack', 'no');
action.setRedirectURL(uri.toString('sys_m2m_template.do'));

(Not sure why the "var path" line is there since "path" is never used.)  This didn't work for me at all until I set the "Action name" to "sysverb_edit_m2m".  Now, it redirects to the template, but just sits there "Loading".

 

Setp -1 

ARNABSEN1_0-1696519140649.png

 

Step 2 ( Create a relationship in Problem table and add in my case use - cmdb_ci_ni_site table ) and on it add the UI action , UI action condition mentiond in step -1

ARNABSEN1_1-1696519327774.png

 

 

Now once I cleck the edit button its showing loading state.

Step -3 

Once clieck on the 'Edit Arnab'  UI action its showing as loading like below and picking up data from  cmdb_ci_ni_site table.

 

ARNABSEN1_2-1696519602495.png

 

I want to bring the Test1 value in left pane so that I can select to right pane.

 

1 ACCEPTED SOLUTION

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

If you create a m2m table between two tables you generally will have the edit button available by default in the related list. 

 

Please mark my answer as correct based on impact.

View solution in original post

2 REPLIES 2

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

If you create a m2m table between two tables you generally will have the edit button available by default in the related list. 

 

Please mark my answer as correct based on impact.

Yes you are correct.