Coming soon: Your brand new Help Center & Community! Get a sneak-peek here

Add item to Task Menu for a Document

Hi there,

In SOWindows we are able to add a new task to the task menu in the document dialog (which then also appears as a right-click option in the document archive)

You can do this in SOAdmin\GUI Application in the Edit List Item dialog the defines the Task, this can then point to a script file somewhere on the file system.

Is it possible to replicate this in CRMScript so that the new task item can be visible in SOWeb too?

 

Cheers James

RE: Add item to Task Menu for a Document

Any ideas on this one?

For clarification when I said is this possible to do with a CRM Script I didn't mean execute a VB Script on the file system from CRM Script, I just meant can a menu item on the task button\archive right-click menu execute a CRM Script? 

I will write the CRM Script so that it replicates what the previous VB Script did.

 

Cheers James

Av: James Carter 5. okt 2021

RE: Add item to Task Menu for a Document

Hi James, 

you could have your button point to a CRMScript, like this: /scripts/blogic.exe?action=doScript&includeId=button-script-on-document&documentId=<doid>

Then write a script like this:

 

The menu-option on the document seems to only be available from the Task-button inside the document dialog, not when rightclicking  on a document row. I assume that is a bug that will get fixed at some point.

A minor drawback with this approach is that it will open a new Chrome-tab when you click the button. You could just print out some HTML to tell the user to close the tab again.

Av: Frode Lillerud 5. okt 2021

RE: Add item to Task Menu for a Document

Hi Frode,

I shall try your suggestions. Many thanks for your time :)

 

Cheers James

Av: James Carter 5. okt 2021

RE: Add item to Task Menu for a Document

Hi Frode,

thanks for pointing me in the right direction.

Here's how I closed the tab\window that opens:

Cheers James

Av: James Carter 6. okt 2021

RE: Add item to Task Menu for a Document

Hey, that's a nice trick. Good job, James :)

Av: Frode Lillerud 6. okt 2021

RE: Add item to Task Menu for a Document

Look at this, it is a html file I call OpenLocalProtocol, which is used to open a local protocol and close the browser window again that it uses. I call it from a web page to open e.g. navision:xxx.yyy.zzz, which opens navision and shows the data related to the input parameters.

You should be able to use the technique from the timer.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <script type="text/javascript">
        var uri = decodeURIComponent(location.search.split('url=')[1]);
        window.location.replace(uri);
        setTimeout(function () {
            window.open('', '_self', '');
            window.close();
        }, 250);
    </script>
    <title>Open local protocol</title>
</head>
<body>
</body>
</html>
Av: Martin Andersen 6. okt 2021