Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..
1292 views

Getting "Update cancelled by trigger (se.base.method,update.record)" when changing KMdoctype

Jump to solution

Hello,

I'm trying to change the name of a document type but it's not saving and i'm getting Update cancelled by trigger (se.base.method,update.record) . It's only happening on the reference document type, I can rename all other document types just not the reference document type. 

I've tried logging in and out, the datapolicy and the DBdict looks alright, and I haven't made any triggers and don't see triggers that have to do with this

 Any ideas what could be causing this issue?? I've attached the full messages

0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Getting "Update cancelled by trigger (se.base.method,update.record)" when changing KMd

Jump to solution

In the command window, enter 'triggers' (or use Database Manager and search for the table 'triggers')

Look for the two triggers 'km.doctype.update' and 'km.doctype.delete'

There is one line in each trigger that is causing the issue.  in 'km.doctype.delete' it's line 13:

print(scmsg(105, "km"))

and in 'km.doctype.update' it's line 17:

print(scmsg(106, "km"))

Those should be changed to:

print(system.functions.scmsg(105,"km"))

and 

print(system.functions.scmsg(106,"km"))

respectively

The issue is that scmsg isn't a Javascript function, so the developers should have used system.functions.scmsg command to invoke the RTE function scmsg and make the user-friendly message print successfully. 

View solution in original post

7 Replies
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Getting "Update cancelled by trigger (se.base.method,update.record)" when changing KMd

Jump to solution

what version of HPSM are you using?

Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Getting "Update cancelled by trigger (se.base.method,update.record)" when changing KMd

Jump to solution

In the command window, enter 'triggers' (or use Database Manager and search for the table 'triggers')

Look for the two triggers 'km.doctype.update' and 'km.doctype.delete'

There is one line in each trigger that is causing the issue.  in 'km.doctype.delete' it's line 13:

print(scmsg(105, "km"))

and in 'km.doctype.update' it's line 17:

print(scmsg(106, "km"))

Those should be changed to:

print(system.functions.scmsg(105,"km"))

and 

print(system.functions.scmsg(106,"km"))

respectively

The issue is that scmsg isn't a Javascript function, so the developers should have used system.functions.scmsg command to invoke the RTE function scmsg and make the user-friendly message print successfully. 

View solution in original post

Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Getting "Update cancelled by trigger (se.base.method,update.record)" when changing KMd

Jump to solution

Thank you for your reply,

I think we're getting closer, but the issue is still occuring. I've attached pictures of my two triggers, and the error i'm getting.

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Getting "Update cancelled by trigger (se.base.method,update.record)" when changing KMd

Jump to solution

Well, now you're no longer getting the error - you're getting the correct message and your action is being cancelled by the rules within the triggers.

In the case of your delete, the system won't let you delete the kmdoctype record because there's a kmdocument record using that doctype.

Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Getting "Update cancelled by trigger (se.base.method,update.record)" when changing KMd

Jump to solution

Do I need that trigger? Why does it only block me from deleting the reference doctype and none of the others. I just deleted the trigger in our dev environment, do you think that will cause any issues? Once it was deleted I was able to delete the reference doctype

 

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Getting "Update cancelled by trigger (se.base.method,update.record)" when changing KMd

Jump to solution

Well, the trigger is there to keep you from deleting the kmdoctype record if there are kmdocuments that use that type.  The reason that was triggering only for that last kmdoctype record was probably because there were no other kmdocuments for the other types.  

So you've deleted the thing that makes sure you don't delete a kmdoctype record if there are KM documents using that type; so if you try to view those documents, they may give you errors.

Basically, you deleted the thing that enforces a process.  Instead of deleting the trigger, you should have checked the KM Documents and either updated those to a different kmdoctype or deleted those documents.  It's possible that you'll have trouble viewing those now.

Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Getting "Update cancelled by trigger (se.base.method,update.record)" when changing KMd

Jump to solution

OHHH, okay. I understand now. I really appreciate your help today! 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.