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

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

Parents
  • Verified Answer

    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. 

  • 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.

  • 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.

  • 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.

  • 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.

  • 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

     

Reply Children
  • 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.

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