Skip to content

Commit b479aa6

Browse files
authored
Merge pull request #2391 from MicrosoftDocs/hwan-clientapi
Client API updates
2 parents 74fa21c + e3cc94f commit b479aa6

File tree

7 files changed

+129
-4
lines changed

7 files changed

+129
-4
lines changed

powerapps-docs/developer/model-driven-apps/clientapi/TOC.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
href: ./reference/events/grid-onrecordselect.md
2222
- name: Grid OnSave event
2323
href: ./reference/events/grid-onsave.md
24+
- name: OnLookupTagClick event
25+
href: ./reference/events/onlookuptagclick.md
2426
- name: OnProcessStatusChange event
2527
href: ./reference/events/onprocessstatuschange.md
2628
- name: OnPreProcessStatusChange event
@@ -152,6 +154,8 @@
152154
href: reference/controls/addCustomView.md
153155
- name: addNotification
154156
href: reference/controls/addNotification.md
157+
- name: addOnLookupTagClick
158+
href: reference/controls/addOnLookupTagClick.md
155159
- name: addOnPostSearch
156160
href: reference/controls/addOnPostSearch.md
157161
- name: addOnResultOpened
@@ -214,6 +218,8 @@
214218
href: reference/controls/openSearchResult.md
215219
- name: refresh
216220
href: reference/controls/refresh.md
221+
- name: removeOnLookupTagClick
222+
href: reference/controls/removeOnLookupTagClick.md
217223
- name: removeOnPostSearch
218224
href: reference/controls/removeOnPostSearch.md
219225
- name: removeOnResultOpened

powerapps-docs/developer/model-driven-apps/clientapi/reference/Xrm-Utility/lookupObjects.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ search.app:
3535
|disableMru|Boolean|No|Decides whether to display the most recently used(MRU) item.<br />Available only for Unified Interface.|
3636
|entityTypes|Array|No|The entity types to display.|
3737
|filters|Array of objects|No|Used to filter the results. Each object in the array contains the following attributes:<br /><ul><li>**filterXml**: String. The FetchXML filter element to apply.</li><li>**entityLogicalName**: String. The entity type to which to apply this filter.</li></ul>|
38+
|searchText|String|No|Indicates the default search term for the lookup control. This is supported only on [Unified Interface](https://docs.microsoft.com/power-platform/admin/about-unified-interface).|
3839
|showBarcodeScanner|Boolean|No|Indicates whether the lookup control should show the barcode scanner in mobile clients.|
3940
|viewIds|Array|No|The views to be available in the view picker. Only system views are supported.|
4041
|successCallback |Function |Yes |A function to call when the lookup control is invoked. An array of objects with the following properties is passed:<br/><ul><li>**entityType**: String. Entity type of the record selected in the lookup control.</li><li>**id**: String. ID of the record selected in the lookup control.</li><li>**name**: String. Name of the record selected in the lookup control.</li>|

powerapps-docs/developer/model-driven-apps/clientapi/reference/controls.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,28 +161,30 @@ These are the methods available for a lookup control.
161161
<li><a href="controls/addCustomFilter.md" data-raw-source="[addCustomFilter](controls/addCustomFilter.md)">addCustomFilter</a></li>
162162
<li><a href="controls/addCustomView.md" data-raw-source="[addCustomView](controls/addCustomView.md)">addCustomView</a></li>
163163
<li><a href="controls/addNotification.md" data-raw-source="[addNotification](controls/addNotification.md)">addNotification</a></li>
164+
<li><a href="controls/addOnLookupTagClick.md" data-raw-source="[addOnLookupTagClick](controls/addOnLookupTagClick.md)">addOnLookupTagClick</a></li>
164165
<li><a href="controls/addPreSearch.md" data-raw-source="[addPreSearch](controls/addPreSearch.md)">addPreSearch</a></li>
165166
<li><a href="controls/clearNotification.md" data-raw-source="[clearNotification](controls/clearNotification.md)">clearNotification</a></li>
166167
<li><a href="controls/getAttribute.md" data-raw-source="[getAttribute](controls/getAttribute.md)">getAttribute</a></a></li>
167168
<li><a href="controls/getControlType.md" data-raw-source="[getControlType](controls/getControlType.md)">getControlType</a></li>
168-
<li><a href="controls/getDefaultView.md" data-raw-source="[getDefaultView](controls/getDefaultView.md)">getDefaultView</a></li>
169+
169170
</ul>
170171
</td>
171172
<td>
172173
<ul>
174+
<li><a href="controls/getDefaultView.md" data-raw-source="[getDefaultView](controls/getDefaultView.md)">getDefaultView</a></li>
173175
<li><a href="controls/getDisabled.md" data-raw-source="[getDisabled](controls/getDisabled.md)">getDisabled</a></li>
174176
<li><a href="controls/getEntityTypes.md" data-raw-source="[getEntityTypes](controls/getEntityTypes.md)">getEntityTypes</a></li>
175177
<li><a href="controls/getLabel.md" data-raw-source="[getLabel](controls/getLabel.md)">getLabel</a></li>
176178
<li><a href="controls/getName.md" data-raw-source="[getName](controls/getName.md)">getName</a></li>
177179
<li><a href="controls/getParent.md" data-raw-source="[getParent](controls/getParent.md)">getParent</a></li>
178180
<li><a href="controls/getVisible.md" data-raw-source="[getVisible](controls/getVisible.md)">getVisible</a></li>
179-
<li><a href="controls/removePreSearch.md" data-raw-source="[removePreSearch](controls/removePreSearch.md)">removePreSearch</a></li>
180-
<li><a href="controls/setDefaultView.md" data-raw-source="[setDefaultView](controls/setDefaultView.md)">setDefaultView</a></li>
181-
181+
<li><a href="controls/removeOnLookupTagClick.md" data-raw-source="[removeOnLookupTagClick](controls/removeOnLookupTagClick.md)">removeOnLookupTagClick</a></li>
182182
</ul>
183183
</td>
184184
<td>
185185
<ul>
186+
<li><a href="controls/removePreSearch.md" data-raw-source="[removePreSearch](controls/removePreSearch.md)">removePreSearch</a></li>
187+
<li><a href="controls/setDefaultView.md" data-raw-source="[setDefaultView](controls/setDefaultView.md)">setDefaultView</a></li>
186188
<li><a href="controls/setDisabled.md" data-raw-source="[setDisabled](controls/setDisabled.md)">setDisabled</a></li>
187189
<li><a href="controls/setEntityTypes.md" data-raw-source="[setEntityTypes](controls/setEntityTypes.md)">setEntityTypes</a></li>
188190
<li><a href="controls/setFocus.md" data-raw-source="[setFocus](controls/setFocus.md)">setFocus</a></li>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: "addOnLookupTagClick (Client API reference) in model-driven apps| MicrosoftDocs"
3+
ms.date: 02/24/2020
4+
ms.service: powerapps
5+
ms.topic: "reference"
6+
author: "KumarVivek"
7+
ms.author: "kvivek"
8+
manager: "annbe"
9+
search.audienceType:
10+
- developer
11+
search.app:
12+
- PowerApps
13+
- D365CE
14+
---
15+
# addOnLookupTagClick (Client API reference)
16+
17+
Adds an event handler to the [OnLookupTagClick](../events/onlookuptagclick.md) event.
18+
19+
## Control types supported
20+
21+
Lookup
22+
23+
## Syntax
24+
25+
`formContext.getControl(arg).addOnLookupTagClick(myFunction);`
26+
27+
## Parameter
28+
29+
|Name|Type|Required|Description|
30+
|--|--|--|--|
31+
|myFunction|Function reference|Yes|The function to add to the **OnLookupTagClick** event. The [execution context](../../clientapi-execution-context.md) is automatically passed as the first parameter to this function along with eventArgs that contain the tag value. More information: [OnLookupTagClick event](../events/onlookuptagclick.md).<br/><br/>You should use a reference to a named function rather than an anonymous function if you later want to remove the event handler.|
32+
33+
### Related topics
34+
35+
[removeOnLookupTagClick](removeOnLookupTagClick.md)
36+
37+
[OnLookupTagClick event](../events/onlookuptagclick.md)
38+
39+
40+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: "removeOnLookupTagClick (Client API reference) in model-driven apps| MicrosoftDocs"
3+
ms.date: 10/31/2018
4+
ms.service: powerapps
5+
ms.topic: "reference"
6+
ms.assetid: 649fe7b0-016d-409f-ba3c-b14e0f1953e0
7+
author: "KumarVivek"
8+
ms.author: "kvivek"
9+
manager: "annbe"
10+
search.audienceType:
11+
- developer
12+
search.app:
13+
- PowerApps
14+
- D365CE
15+
---
16+
# removeOnLookupTagClick (Client API reference)
17+
18+
Removes an event handler from the [OnLookupTagClick](../events/onlookuptagclick.md) event.
19+
20+
## Control types supported
21+
22+
Lookup
23+
24+
## Syntax
25+
26+
`formContext.getControl(arg).removeOnLookupTagClick(myFunction);`
27+
28+
## Parameter
29+
30+
|Name|Type|Required|Description|
31+
|--|--|--|--|
32+
|myFunction|Function reference|Yes|The function to be removed from the [OnLookupTagClick](../events/onlookuptagclick.md) event.|
33+
34+
### Related topics
35+
36+
[addOnLookupTagClick](addOnLookupTagClick.md)
37+
38+
[OnLookupTagClick event](../events/onlookuptagclick.md)
39+
40+
41+

powerapps-docs/developer/model-driven-apps/clientapi/reference/events.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ Events occur in Custom Engagement forms and grids whenever a form or grid loads,
4545
- [PostSearch](events/postsearch.md)
4646

4747
## Lookup control event
48+
- [OnLookupTagClick](events/onlookuptagclick.md)
4849
- [PreSearch](events/presearch.md)
4950

51+
5052
## Process events
5153
- [OnProcessStatusChange](events/onprocessstatuschange.md)
5254
- [OnStageChange](events/onstagechange.md)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: "OnLookupTagClick Event (Client API reference) in model-driven apps| MicrosoftDocs"
3+
ms.date: 02/11/2020
4+
ms.service: powerapps
5+
ms.topic: "reference"
6+
ms.assetid: e291973b-9634-4442-995c-37fd49a10571
7+
author: "KumarVivek"
8+
ms.author: "kvivek"
9+
manager: "annbe"
10+
search.audienceType:
11+
- developer
12+
search.app:
13+
- PowerApps
14+
- D365CE
15+
---
16+
17+
# OnLookupTagClick Event (Client API reference)
18+
19+
This event occurs when the user clicks the tag in a lookup control.
20+
21+
An execution context object is passed to event handlers for this event. You can use the [getEventArgs](../executioncontext/getEventArgs.md) method to retrieve an object that has the **getTagValue** method.
22+
23+
The **getTagValue** method returns an object with the following properties:
24+
25+
- **name**. String. Name of the tag.
26+
- **id**: String. ID of the tag.
27+
- **entityType**. String. Entity type of the tag.
28+
- **fieldName**. String. The originating lookup field that raised the event.
29+
30+
## Methods supported for this event
31+
- [addOnLookupTagClick](../controls/addOnLookupTagClick.md) method to add event handlers for this event.
32+
- [removeOnLookupTagClick](../controls/removeOnLookupTagClick.md) method to remove event handlers for this event.
33+

0 commit comments

Comments
 (0)