How do I default the Saleslogix description field on the edit address screen to ‘Mailing’?


How do I  default the Saleslogix description field on the edit address screen to ‘Mailing’?


The main issue is that for Address Edit the applyContext function is never called.


The Address Edit view flow is:


Contact Detail View

Contact Edit View (may query for default values (and call applyContext on itself) or  use passed values)

Address Edit View — always gets passed the existing value from the previous Edit view. Therefore applyContext never happens since there is no $template request for default values, it always uses the passed values.


Meaning if you want to set a default value (to be passed) you would have to do it in the Contact View (and all views that have an address field), something like:


Ext.override(Mobile.SalesLogix.Contact.Edit, {
    applyContext: function() {
        Mobile.SalesLogix.Contact.Edit.superclass.applyCon​text.apply(this, arguments);
        console.log(‘setting description’);


*Note that AddressField stores an object with all the address parts as keys.


So for:

a) Typical cases (not EditorFields which AddressField inherits) your approach is correct, using applyContext to provide a direct ‘default value’ for new insertions.


b) Take a peek at Contact/Edit — in the init() function it binds to the onchange event of the Account field. In the handler, onAccountChange, it sets a field based on a property of the new Account object.


Submit a Comment

Your email address will not be published.

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!