Resco JavaScript Bridge: Difference between revisions

Jump to navigation Jump to search
→‎Using EntityList object and its methods: trimming some confusing statements
(→‎Using EntityList object and its methods: trimming some confusing statements)
Line 866: Line 866:
=== Using EntityList object and its methods ===
=== Using EntityList object and its methods ===


In this example, we discuss and explain scenarios that can help you understand the logic and use of the mentioned objects. We already know how to add iframes to views. Let's assume that we have a script bound to the Account entity view.
In this example, we discuss and explain scenarios that can help you understand the logic and use of the mentioned objects. We already know how to add iframes to views. Let's assume that we have a script bound to the Contact entity view.


==== Retrieve fetch data source and create view ====
==== Retrieve fetch data source and create view ====
Line 875: Line 875:
https://www.resco.net/javascript-bridge-reference/#MobileCRM_UI_EntityList_setDataSource
https://www.resco.net/javascript-bridge-reference/#MobileCRM_UI_EntityList_setDataSource


In the first example, we can see that we can modify the fetch source by adding a filter or basic fetch methods. All these inputs create an array result that represents our source. All element data in the array are displayed in a single row. For a better explanation, let’s see how it looks in the app.
In the example, we can see that we can modify the fetch source by adding a filter or basic fetch methods. All these inputs create an array result that represents our source.
 
[[File:JSBridge Guide 021.png|600px]]
 
From the screenshot, it is obvious that the values of the correct fields are displayed. In the code from the reference page, we want the fetch output as an array of dynamic entities. This object carries the values of the entity property.


{{Note|It is very important to make sure that all the properties which we filter or display are enabled and we display only those which are bound on the row.}}
{{Note|It is very important to make sure that all the properties which we filter or display are enabled and we display only those which are bound on the row.}}

Navigation menu