Creating Modules for the Creatio Mobile Client

Creatio’s mobile client is a hybrid mobile application using the Cordova framework to run a Javascript application inside a native application shell. Creatio provides a mobile application wizard that allows you to easily configure what shows in the mobile application. Just like the Section wizard, the mobile application wizard also generates javascript files. These javascript files sync to the mobile client. Also, just like the section wizard, there’s times when you need to go beyond the javascript that the wizard generates and include custom code to extend things further. This article will outline how to create a module to include in the mobile application.

Modules for the mobile application are different than what you create for the full Creatio client. You’ll basically wire up a module to an entity in the model in the mobile application manifest. The module itself isn’t really a declared module. It really just provides a place to add code to perform actions in the mobile client to add fields, actions, change event handlers, modify field properties in some way, etc. In this article we’ll add a module for the Contact entity. We’ll just go through the steps to wire it up so we can refer to this in later articles where we’ll actually do things in the module.

STEP 1: Use Mobile Wizard to Create Base Files

The first step is to make sure you’ve used the mobile wizard at least once. Even if you just open it and save. You’ll need this to create the mobile application manifest file that we’ll wire our modules into.

STEP 2: Create a new Module Schema

Now we’ll create the module schema itself. From the “Add” menu in the configuration, select “Module” to create a new module client schema in your package. For now, we’ll just give this a name of “UsrMobileContactModule”. You don’t need to add any declare or any other code, it’s fine to just leave this completely empty. As I mentioned before, this isn’t a typical declared module.

STEP 3: Locate the MobileApplicationManifestDefaultWorkplace

One of the files generated by the mobile wizard is the file named MobileApplicationManifestDefaultWorkplace. This file will be in your default/current package after saving the mobile wizard. Note, the file name *could* be different if you’re not using the “DefaultWorkplace” for your mobile application (in that case it will be named “MobileApplicationManifest”+”Workplace name”).

STEP 4: Add the Module for the Entity in the Models Section

Now we’ll wire up the module created in step 2 in the MobileApplicationManifestDefaultWorkplace schema. To do this we’ll open the MobileApplicationManifestDefaultWorkplace then locate the “models” section. Each entity used in the mobile application will exist in this section. Since we’re adding the module for the contact entity in this sample, we’ll locate Contact in the models section. Once located, we’ll simply add the name of our module under the PagesExtensions section for the Contact model. In our sample, it will look like this:

That is all. Now we’ll be able to use that module to add custom code to extend things further. We’ll look at uses of this in future articles.

ABOUT THE AUTHOR

Ryan Farley

Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix, now Infor CRM, since 2001 and believes in sharing with the community. His new passion for CRM is Creatio, formerly bpm'online. He loves C#, Javascript, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!