Can I create 'ExternalDocument / Link' by script?
I already tried factory.js which is included in the below Libraries, but could not create it.
https://medini.freshdesk.com/support/solutions/articles/1000273630-scripting-libraries
The following error occurs.
If there are any method to create it, could you please tell me?
Hello Ota-san,
I guess the script just hasn't supported this function.
In the .lib/factory.js file, from line 1490, there is no type == Metamedel.projectmodel.PJExternalDocument, so your script encountered an error.
Maybe our development team has more technical insight.
Hello Ka-lip-san,
Thank you for your comment.
I also agree with you. With that in mind, I'd like to know the method to create PJExternalDocument in script.
I am importing Excel of our customer's FMEA in script. Their some external document and URL related with Failure Mode is written in the FMEA.
I want to create their external informaition as "PJExternalDocument" in medini. "PJExternalDocument" is very useful because our customer can access their document only by double-click.
If there are any method to create "PJExternalDocument" in script, could you please tell me?
creating documents is a bit more sensitive then the "normal" domain elements. You can find a fucntino to import an external file as PJExternalDocument in the factoryEx.js library, named importDocument (line 47). I suggest to try that one.
You can find sample code in the Test FactoryEx.js file which I have attached - see at the top lines.
Note that the library was not touched for a while, please check if it is working for your version.
Happy Scripting
Jan
Hello Jan-san,
Your script was right on-target! I could confirm that it create PJExternalDocument in medini 2024 R1.
Thanks very much.
Best Regards,
Yusuke