Custom Commands in Resco Mobile App

By | January 4, 2019

Introduction:

Commands in Resco mobile app allow certain actions throughout the whole form. The main principle is to create a command in Woodford, but the logic that need to be performed on execute of the command can be defined in the JavaScript.

Custom Commands in Resco Mobile App

Let’s consider an example, on “Work Order” user wants a custom command to “Close – Posted” the work order from Resco App.

Below will be the steps in order to add custom command for Close Posting the work order:

1. Open “Resco woodford” application. Navigate to “Work Order” entity’s Edit Form and click on “Edit”.

Custom Commands in Resco Mobile App

2. Click on “New Command” and mention name of the command.

Custom Commands in Resco Mobile App

3. Command is created, so in order to bind the action that need to performed using JavaScript or also by using OnExecute button in Woodford. Here we will try using both JavaScript as well as OnExecute. Next step will be adding Html with script on “Work Order” form.

4. Upload the HTML and JavaScript in the offline Html section in Woodford by clicking on the “Upload” button as shown in the below screenshot.

Custom Commands in Resco Mobile App

5. Click on Add IFrame >> Browse to select the html to be added on the form. Refer the below screenshot for the same.

Custom Commands in Resco Mobile App

6. Select the HTML page having javascript code to save and close the current record.

<!DOCTYPE html>

<html xmlns=”http://www.w3.org/1999/xhtml”>

<head>

<title></title>

<meta charset=”utf-8″ />

<meta http-equiv=”X-UA-Compatible” content=”IE=edge” />

<meta name=”viewport” content=”initial-scale=1, user-scalable=no” />

<script src=”Scripts/JSBridge.js”></script>

<script type=”text/javascript”>

function onLoad() {

var functionName = “FnLoad”;

try {

MobileCRM.UI.EntityForm.onCommand(“custom_ClosePostWorkOrder”,

function (entityForm) {

if (entityForm)

MobileCRM.UI.EntityForm.saveAndClose();

}

);

}

catch (e) {

throw new MobileCrmException(functionName + e.message);

}

}

</script>

</head>

<body onload=”onLoad();”>

</body>

</html>

7. Now, on “Work Order” entity’s Edit form, click on Edit. Click on “OnExecute” and add step to change the “System Status” of Work order as “Close Posted”.

Custom Commands in Resco Mobile App

8. Save and Publish the Woodford solution.

9. In Resco app, open “Work Order” record. Click on “Close Post Work Order”. This will change the “System Status” to “Close- Posted”, also save and close the “work order” record.

Custom Commands in Resco Mobile App

Custom Commands in Resco Mobile App

Conclusion:

Using the simple steps given above user can easily create Custom Commands in Resco Mobile App.

Read our blog series on Resco Mobile CRM

InoLink-QuickBooks-Integration-with-Microsoft-Dynamics-365-Dynamics-CRM

3 thoughts on “Custom Commands in Resco Mobile App

  1. Eima

    How to make localizations on current custom command labels? for example “on change” language change that command menu.

    1. inogic

      Hi,
      Resco provides support for localization to translate the labels of the custom commands for particular language. You need to add Label in the specific language in the Localization tab of the Resco Woodford, so when user change the language of the Mobile app it displays the custom command labels in that language.

      Thanks!

      1. Eima

        thanks for reply. Already done it adding the new localizations in each language using label as a id “Cmd.DoSomething”. Now im stuck on another customization.
        I have view and it has some detailed views like info, general, inventory. In inventory view i have list of elements and on each element i added custom button. By pushing this button i want to add this element to general view. What should I do? i tried offline html by adding script onCommand but even cant get alert on pushing that button.

Comments are closed.