locked
send parameter to exe in crm 2011 RRS feed

  • Question

  • hi everyone,

    i use mscrm 2011.

    i have written a javascript on load event that run exe by using js, but i also want to send a value(parameter) to this exe's field(for example phone number).

    is it possible?

    how can i perform it?


    Crm Software Specialist

    Monday, February 25, 2013 11:49 AM

Answers

  • Hi,

    Try this:

    var objShell = new ActiveXObject("Shell.Application");
    objShell.ShellExecute('C:\app.exe ' + Xrm.Page.getAttribute("FieldName").getValue());

    Hope this helps.
    If i answered your question, please mark the response as an answer and also vote as helpful.


    Pedro Azevedo Crm Specialist 4.0\2011

    Monday, February 25, 2013 12:06 PM

All replies

  • Hi,

    Try this:

    var objShell = new ActiveXObject("Shell.Application");
    objShell.ShellExecute('C:\app.exe ' + Xrm.Page.getAttribute("FieldName").getValue());

    Hope this helps.
    If i answered your question, please mark the response as an answer and also vote as helpful.


    Pedro Azevedo Crm Specialist 4.0\2011

    Monday, February 25, 2013 12:06 PM
  • Hi,

    Try this:

    var objShell = new ActiveXObject("Shell.Application");
    objShell.ShellExecute('C:\app.exe ' + Xrm.Page.getAttribute("FieldName").getValue());

    Hope this helps.
    If i answered your question, please mark the response as an answer and also vote as helpful.


    Pedro Azevedo Crm Specialist 4.0\2011

    i have a value phonenumber on phonecall form i want to send this value to exe's form's phonecall field.

    var _Object = new ActiveXObject("WScript.Shell");
        _Object.Run("C:\\Users\\pc\\Desktop\\test.exe");
    var objShell = new ActiveXObject("Shell.Application");
    objShell.ShellExecute(C:\\Users\\pc\\Desktop\\test.exe' + Xrm.Page.getAttribute("phonenumber").getValue());

    i have tried it but doesnt work


    Crm Software Specialist

    Monday, February 25, 2013 12:44 PM
  • Hi,

    Firstly you can call the exe without parameters? The WScript is good for who don't have that activex  installed. Use your code (WScript) and add the parameter don't forget put a space between the ".exe" and the value of parameter. See here more information.

    Hope this helps.
    If i answered your question, please mark the response as an answer and also vote as helpful.


    Pedro Azevedo Crm Specialist 4.0\2011

    Monday, February 25, 2013 1:17 PM
  • Hi,

    Firstly you can call the exe without parameters? The WScript is good for who don't have that activex  installed. Use your code (WScript) and add the parameter don't forget put a space between the ".exe" and the value of parameter. See here more information.

    Hope this helps.
    If i answered your question, please mark the response as an answer and also vote as helpful.


    Pedro Azevedo Crm Specialist 4.0\2011

    i have tried it but doesnt work!

    var _Object = new ActiveXObject("WScript.Shell");
        _Object.Run("C:\\Users\\pc\\Desktop\\test.exe" "1");


    Crm Software Specialist

    Monday, February 25, 2013 2:42 PM
  • Hi,

    Your code is not well formatted, try this:

    var _Object = new ActiveXObject("WScript.Shell");
        _Object.Run("C:\\Users\\pc\\Desktop\\test.exe " + "1");

    When you run against command line this line works:

    C:\\Users\\pc\\Desktop\\test.exe 1
    Hope this helps.
    If i answered your question, please mark the response as an answer and also vote as helpful.


    Pedro Azevedo Crm Specialist 4.0\2011

    Monday, February 25, 2013 3:24 PM