We are preparing a new source of documentation for you. Work in progress!

Metadata changes in live projects

From Resco's Wiki
Jump to: navigation, search

Best practice when updating or adding metadata (fields, entities) on CRM server

In case a change is made on the CRM server, e.g. changing option set values, Woodford must be restarted so that it can load the latest changes in metadata. Then you need to republish all projects to apply these changes to them. If a field is added to CRM, you also need to enable it in project and place it into view or form.

Best practice when disabling fields

When a field that is used somewhere in the application is disabled, Mobile CRM application can crash when the user tries to access a view or form where this field is used. To avoid this situation, you should keep in mind these steps:

When you want to disable the field that is enabled in the entity, first remove the reference of this field from each view, form, or chart, and also from other entity views where it is used.

  • For views, edit the view, click Select Fields, and disable the field from the view.
  • The same applies to charts. Use Select Fields to remove the field from the view.
  • For forms, you just need to delete the field from it.

Now the field can be disabled and it will no longer be used in Mobile CRM application. Any change in fields (enabling/disabling a field) causes a full sync for this entity.

A special case is when you want to remove a field from the CRM server.

  • If this field is enabled and used on the Mobile CRM application, first perform the steps above.
  • Let users to synchronize the app, but instruct them not to make any changes to data.
  • After they all synchronize, remove the field, publish the project, and synchronize again.

This is the only way to prevent problems where users make changes to a field that is going to be removed. A problem that can occur is that server reports an error when a Mobile CRM app attempts to update/fill in a field that no longer exists on the CRM server.

Removing field/option from CRM server

When you remove a field, an option from option set, or an entity from the CRM, you first need to let your users synchronize the changed data, and then remove all references of the field from forms and views. Then you can disable the field in the project and the field can be removed from the CRM. Otherwise, users that have the field filled in, will not be able to synchronize the changes.

When this situation happens (you remove a field or option from option set) and users are not able to sync, as value in their record does not exists on the CRM server any more, that option needs to be added back to the CRM server, let user(s) synchronize and then continue as above.

Alternatively, users must delete their changes/data by selecting the Advanced > Delete Data option in the app's Setup. Of course, they lose any unsynchronized changes.