Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Copper Super Contributor
Posts: 172
Registered: ‎07-06-2010
Accepted Solution

Adding a Custom Edit View in SlxMobile3

I'm trying to follow along with the argos-sample source provided in the Mobile Toolkit, but its targeted at version 2, and I am working in Mobile 3.


I am trying to create a custom Edit view for an Opportunity entity. I want it to be custom, because I intend to allow the user to change only 1 field in a related table, and I do not want to expose this field using the normal Edit functionality. So it's basically a link under the Related Actions table in the GUI.


Even though it appears I am following the same template in argos-sample for the GoogleMapView view, I cannot get my view to render in Mobile 3. The app just shows a blank page and Chrome Dev tools shows the last resource retrieved is the logo.png resource. There's nothing else on the page at all.


The part that's causing it to choke is the second registerView function here, the one for SPStatusEdit:


loadViews: function () {
            this.registerView(new AddAccountContact());
            this.registerView(new SPStatusEdit());

The first registerView call works fine, meaning if I remove the one under it the page fully loads correctly.


I have the following detailed at the top of my custom ApplicationModule file:


    'Mobile/MyCompanyName/Views/SPStatusEdit' //include the path here and instance variable below
    ], function (


 The file I am pointing to is at the src/Views path in Products/MyCompanyName, and since ApplicationModule works correctly I'm assuming my index file is also correct when setting the aliases up:


        baseUrl: "./",
        packages: [
            { name: 'dojo', location: '../../argos-sdk/libraries/dojo/dojo' },
            { name: 'dijit', location: '../../argos-sdk/libraries/dojo/dijit' },
            { name: 'dojox', location: '../../argos-sdk/libraries/dojo/dojox' },
            { name: 'snap', location: '../../argos-sdk/libraries/snap', main: 'snap' },
            { name: 'moment', location: '../../argos-sdk/libraries/moment', main: 'moment' },
            { name: 'moment_langs', location: '../../argos-sdk/libraries/moment/min', main: 'langs' },
            { name: 'Sage/Platform/Mobile', location: '../../argos-sdk/src' },
            { name: 'Mobile/SalesLogix', location: 'src' },
            { name: 'configuration', location: 'configuration' },
            { name: 'localization', location: 'localization' },
            { name: 'Mobile/MyCompanyName, location: '../argos-MyCompanyName/src' },
            { name: 'configuration/MyCompanyName, location: '../argos-MyCompanyName/configuration' }
        paths: {
            'Mobile/SalesLogix': './src',
            'Sage/Platform/Mobile': '../../argos-sdk/src',
            'Mobile/MyCompanyName: '../argos-MyCompanyName/src',

 And finally, the View I want to add is a straight copy/paste from the Edit.jsfile located in Opportunity, with the exception of changing the ID and the type:


define('Mobile/MyCompanyName/Views/SPStatusEdit', [
], function(
) {

    return declare('Mobile.MyCompanyName.Views.SPStatusEdit', [Edit], {

 What is the method now for adding custom views in Mobile 3? This method works fine for me in my Mobile 2 implementation, but since Dev Tools isn't telling me anything's "broken" I am struggling to figure out why the app views don't show at all once I add the registerView call for my custom view.



Copper Super Contributor
Posts: 172
Registered: ‎07-06-2010

Re: Adding a Custom Edit View in SlxMobile3

Solved; the directory structure was out of whack and I had to rebuild it per the argos-sample project from Github.