dynamics crm - Resco Mobile offline HTML (Field Service ) - online/ offline issues on update entities -
i'm developing project using resco mobile offline html , got different problems when app online or offline.
when it's "online":
i can create , delete entities using html can't update them. got stuck hours trying update field before figure out problem occurs when i'm online. ex.:
i have account:
then changed "account type" "fornitore" "gruppo" , saved
before after if search @ crm remain "fornitore" 
and if reopen record:
so, after click on "save" value doesn't change on crm or on app. if go offline, update (on point it's updated on cellphone) , synchronize (to send crm):
on crm
the js method used update:
//jsbridge.js version: 10.1 function update() { mobilecrm.dynamicentity.loadbyid( 'account', window.location.search.substring(1), //accountid function (entity) { var plab_postalcode = document.getelementbyid('plab_postalcode').getattribute("data-id"); //... entity.properties.plab_revenuerating = document.getelementbyid("plab_revenuerating").value; // optionset , text if (plab_postalcode != '' && plab_postalcode !== null) entity.properties['plab_postalcode'] = new mobilecrm.reference('systemuser', plab_postalcode); //for lookups entity.save(error_callback) }, function (error) { mobilecrm.bridge.alert('an error occurred: ' + error); } ); } function error_callback(err) { if (err !== null) mobilecrm.bridge.alert('error: ' + err); else mobilecrm.bridge.alert('account saved!'); } i asked @ dynamics community question answered. if want read topic: https://community.dynamics.com/crm/f/117/t/245232










Comments
Post a Comment