-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathXrmPage-vsdoc.js
More file actions
702 lines (691 loc) · 30.2 KB
/
XrmPage-vsdoc.js
File metadata and controls
702 lines (691 loc) · 30.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
// Author: Patrick Verbeeten
// Website: www.patrickverbeeten.com
// Updated: 2011-04-14 (CRM 2011)
// If you do not agree to this license as a whole do not install or use.
//
// License:
// This Software is being distributed as Freeware. It may be freely used,
// copied and distributed under the following conditions:
//
// 1. All original files must be included, including this license.
// 2. You may not change or reverse engineer this software in any way.
// 3. It may not be not sold and You are NOT allowed to make a charge for use
// or distribution of this Software (either for profit or merely to recover
// your media and distribution costs) whether as a stand-alone product, or
// as part of a compilation or anthology, without explicit prior written
// permission.
//
// By using this Software, you agree to these terms and the terms of the
// Disclaimer below.
//
// Disclaimer:
// This software is provided by the author and contributors "as is'' and any
// express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are
// disclaimed. In no event shall the author or contributors be liable for any
// direct, indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or
// services; loss of use, data, or profits; or business interruption) however
// caused and on any theory of liability, whether in contract, strict
// liability, or tort (including negligence or otherwise) arising in any way
// out of the use of this software, even if advised of the possibility of such
// damage.
//
var XrmTypes = {
Section: function () {
},
SectionCollection: function () {
},
Tab: function () {
},
TabCollection: function () {
},
Control: function () {
},
ControlCollection: function () {
},
NavigationItem: function () {
},
NavigationItemsCollection: function () {
},
Navigation: function () {
this.items = new XrmTypes.NavigationItemsCollection();
},
FormSelectorItem: function () {
},
FormSelectorItemsCollection: function () {
},
FormSelector: function () {
this.items = new XrmTypes.FormSelectorItemsCollection();
this.getCurrentItem = function () {
///<summary>Returns a reference to the form currently being shown.</summary>
///<returns type="XrmTypes.FormSelectorItem"/>
}
},
Ui: function () {
this.tabs = new XrmTypes.TabCollection();
this.controls = new XrmTypes.ControlCollection();
this.navigation = new XrmTypes.Navigation();
this.formSelector = new XrmTypes.FormSelector();
},
Option: function () {
},
Lookup: function () {
},
Attribute: function () {
},
AttributeCollection: function () {
},
Entity: function () {
this.attributes = new XrmTypes.AttributeCollection();
},
Data: function () {
this.entity = new XrmTypes.Entity();
},
Context: function () {
},
Page: function () {
this.context = new XrmTypes.Context();
this.ui = new XrmTypes.Ui();
this.data = new XrmTypes.Data();
},
Utility: function () {
},
Xrm: function () {
this.Page = new XrmTypes.Page();
this.Utility = new XrmTypes.Utility();
},
__namespace: true
};
XrmTypes.Xrm.__class = true;
XrmTypes.Page.__class = true;
XrmTypes.Utility.__class = true;
XrmTypes.Ui.__class = true;
XrmTypes.Context.__class = true;
XrmTypes.Data.__class = true;
XrmTypes.Entity.__class = true;
XrmTypes.AttributeCollection.__class = true;
XrmTypes.Attribute.__class = true;
XrmTypes.SectionCollection.__class = true;
XrmTypes.Section.__class = true;
XrmTypes.ControlCollection.__class = true;
XrmTypes.Control.__class = true;
XrmTypes.TabCollection.__class = true;
XrmTypes.Tab.__class = true;
XrmTypes.Navigation.__class = true;
XrmTypes.NavigationItemsCollection.__class = true;
XrmTypes.NavigationItem.__class = true;
XrmTypes.FormSelector.__class = true;
XrmTypes.FormSelectorItemsCollection.__class = true;
XrmTypes.FormSelectorItem.__class = true;
XrmTypes.Option.__class = true;
XrmTypes.Lookup.__class = true;
XrmTypes.Data.prototype = {
getIsValid: function () {
},
///<summary>use .then(successCallback, errorCallback);</summary>
refresh: function (save){
},
save: function () {
///<summary>use .then(successCallback, errorCallback);</summary>
}
}
XrmTypes.Utility.prototype = {
alertDialog: function (message, onCloseCallback) {
///<param name="message">String</param>
///<param name="onCloseCallback"> function</param>
///<summary>Shortcut for Xrm.Utility.alertDialog</summary>
///<returns type="XrmTypes.Utility"></returns>
},
confirmDialog: function (message, yesCloseCallback, noCloseCallback) {
//return new XrmTypes.Utility();
},
isActivityType: function(entityName){
},
openEntityForm: function (name, id, parameters) {
///<param name="name">The logical name of an entity</param>
///<param name="id" type="String" optional="true">The string representation of a unique identifier or the record to open in the form. If not set, a form to create a new record is opened</param>
///<param name="parameters" type="Dictionary" optional="true">Optional dictionary object</param>
///<summary>Shortcut for Xrm.Utility.alertDialog</summary>
},
openWebResource: function(webResourceName,webResourceData,width, height){
}
};
XrmTypes.Page.prototype = {
getAttribute: function (id) {
///<param name="id">String: The attribute where the name matches the argument. function(attribute, index): Any attributes that cause the delegate function to return true</param>
///<summary>Shortcut for Xrm.Page.data.entity.attributes.get</summary>
///<returns type="XrmTypes.Attribute"></returns>
return new XrmTypes.Attribute();
},
getControl: function (id) {
///<summary>Returns one or more controls depending on the arguments passed.</summary>
///<param name="id">String: The control where the name matches the argument. function(attribute, index): Any controls that cause the delegate function to return true</param>
///<returns type="XrmTypes.Control"></returns>
return new XrmTypes.Control();
}
};
XrmTypes.Ui.prototype = {
setFormNotification: function (message, level, uniqueId) {
///<summary>Use this method to display form level notifications.</summary>
///<param name="message">String: The text of the message </param>
///<param name="level">Type: ERROR, WARNING, INFO</param>
///<param name="uniqueId">String:A unique identifier for the message used with clearFormNotification to remove the notification</param>
},
clearFormNotification: function (uniqueId) {
///<param name="uniqueId">String:unique identifier for the message used with setFormNotification to set the notification</param>
},
getFormType: function () {
///<summary>Indicates the form context for the record.</summary>
///<returns type="Number"/>
},
getCurrentControl: function () {
///<summary>Returns the control object that currently has focus on the form.</summary>
///<returns type="XrmTypes.Control"/>
},
getViewPortHeight: function () {
///<summary>Returns the height of the viewport in pixels.</summary>
///<returns type="Number"/>
},
getViewPortWidth: function () {
///<summary>Returns the width of the viewport in pixels.</summary>
///<returns type="Number"/>
},
refreshRibbon: function () {
///<summary>Causes the Ribbon to re-evaluate data that controls how it is displayed.</summary>
},
close: function () {
///<summary>Closes the form.</summary>
}
};
XrmTypes.FormSelectorItemsCollection.prototype = {
get: function (id) {
///<returns type="XrmTypes.FormSelectorItem"></returns>
return new XrmTypes.NavigationItem();
},
forEach: function (delegate) {
///<summary>Applies the action contained within a delegate function.</summary>
///<param name="delegate" type="Delegate">Applies the action contained within a delegate function.</param>
},
getLength: function () {
///<summary>Returns the number of items in the collection.</summary>
///<returns type="Number"/>
}
};
XrmTypes.NavigationItemsCollection.prototype = {
get: function (id) {
///<returns type="XrmTypes.NavigationItem"></returns>
return new XrmTypes.NavigationItem();
},
forEach: function (delegate) {
///<summary>Applies the action contained within a delegate function.</summary>
///<param name="delegate" type="Delegate">Applies the action contained within a delegate function.</param>
},
getLength: function () {
///<summary>Returns the number of items in the collection.</summary>
///<returns type="Number"/>
}
};
XrmTypes.AttributeCollection.prototype = {
get: function (id) {
///<param name="id">String: The attribute where the name matches the argument. function(attribute, index): Any attributes that cause the delegate function to return true</param>
///<returns type="XrmTypes.Attribute"></returns>
return new XrmTypes.Attribute();
},
forEach: function (delegate) {
///<summary>Applies the action contained within a delegate function.</summary>
///<param name="delegate" type="Delegate">Applies the action contained within a delegate function.</param>
},
getLength: function () {
///<summary>Returns the number of items in the collection.</summary>
///<returns type="Number"/>
}
};
XrmTypes.TabCollection.prototype = {
get: function (id) {
///<summary>Returns one or more tabs depending on the arguments passed.</summary>
///<returns type="XrmTypes.Tab"></returns>
return new XrmTypes.Tab();
},
forEach: function (delegate) {
///<summary>Applies the action contained within a delegate function.</summary>
///<param name="delegate" type="Delegate">Applies the action contained within a delegate function.</param>
},
getLength: function () {
///<summary>Returns the number of items in the collection.</summary>
///<returns type="Number"/>
}
}
XrmTypes.SectionCollection.prototype = {
get: function (id) {
///<summary>Returns one or more sections depending on the arguments passed.</summary>
///<returns type="XrmTypes.Section"></returns>
return new XrmTypes.Section();
},
forEach: function (delegate) {
///<summary>Applies the action contained within a delegate function.</summary>
///<param name="delegate" type="Delegate">Applies the action contained within a delegate function.</param>
},
getLength: function () {
///<summary>Returns the number of items in the collection.</summary>
///<returns type="Number"/>
}
}
XrmTypes.ControlCollection.prototype = {
get: function (id) {
///<summary>Returns one or more controls depending on the arguments passed.</summary>
///<param name="id">String: The control where the name matches the argument. function(attribute, index): Any controls that cause the delegate function to return true</param>
///<returns type="XrmTypes.Control"></returns>
return new XrmTypes.Control();
},
forEach: function (delegate) {
///<summary>Applies the action contained within a delegate function.</summary>
///<param name="delegate" type="Delegate">Applies the action contained within a delegate function.</param>
},
getLength: function () {
///<summary>Returns the number of items in the collection.</summary>
///<returns type="Number"/>
}
};
XrmTypes.FormSelectorItem.prototype = {
getId: function () {
///<summary>Returns the GUID ID of the roleForm</summary>
///<returns type="String"/>
},
getLabel: function () {
///<summary>Returns the label of the roleForm.</summary>
///<returns type="String"/>
},
navigate: function () {
///<summary>Opens the specified roleForm</summary>
}
};
XrmTypes.NavigationItem.prototype = {
getId: function () {
///<summary>Returns the name of the item.</summary>
///<returns type="String"/>
},
getLabel: function () {
///<summary>Returns the label for the tag.</summary>
///<returns type="String"/>
},
getVisible: function () {
///<summary>Returns a value that indicates whether the item is visible.</summary>
///<returns type="Boolean"/>
},
setFocus: function () {
///<summary>Sets the focus on the item.</summary>
},
setLabel: function (value) {
///<summary>Sets the label for the item.</summary>
///<param name="value" type="String">Label</param>
},
setVisible: function (value) {
///<summary>Sets a value that indicates whether the item is visible.</summary>
///<param name="value" type="Boolean"/>
}
};
XrmTypes.Tab.prototype = {
sections: new XrmTypes.SectionCollection(),
getDisplayState: function () {
///<summary>Returns a value that indicates whether the tab is collapsed or expanded. One of the values 'expanded', 'collapsed'.</summary>
///<returns type="String"/>
},
getLabel: function () {
///<summary>Returns the label for the tab.</summary>
///<returns type="String"/>
},
getName: function () {
///<summary>Returns the name of the tab.</summary>
///<returns type="String"/>
},
getParent: function () {
///<summary>Returns the tab containing the tab.</summary>
///<returns type="XrmTypes.Ui"/>
},
getVisible: function () {
///<summary>Returns a value that indicates whether the tab is visible.</summary>
///<returns type="Boolean"/>
},
setDisplayState: function (value) {
///<summary>Sets the tab to be collapsed or expanded.</summary>
///<param name="value" type="String">One of the values 'expanded', 'collapsed'.</param>
},
setFocus: function () {
///<summary>Sets the focus on the tab.</summary>
},
setLabel: function (value) {
///<summary>Sets the label for the tag.</summary>
///<param name="value" type="String">Label</param>
},
setVisible: function (value) {
///<summary>Sets a value that indicates whether the tag is visible.</summary>
///<param name="value" type="Boolean"/>
}
};
XrmTypes.Section.prototype = {
getLabel: function () {
///<summary>Returns the label for the section.</summary>
///<returns type="String"/>
},
getParent: function () {
///<summary>Returns the tab containing the section.</summary>
///<returns type="XrmTypes.Tab"/>
},
getName: function () {
///<summary>Returns the name of the section.</summary>
///<returns type="String"/>
},
getVisible: function () {
///<summary>Returns a value that indicates whether the section is visible.</summary>
///<returns type="Boolean"/>
},
setLabel: function (value) {
///<summary>Sets the label for the section.</summary>
///<param name="value" type="String">Label</param>
},
setVisible: function (value) {
///<summary>Sets a value that indicates whether the section is visible.</summary>
///<param name="value" type="Boolean"/>
}
};
XrmTypes.Entity.prototype = {
addOnSave: function (delegate) {
///<summary>Sets a function to be called when the record is saved.</summary>
///<param name="delegate" type="Delegate>function pointer</param>
},
removeOnSave: function (delegate) {
///<summary>Removes a function from the OnSave event hander.</summary>
///<param name="delegate" type="Delegate">function pointer</param>
},
getId: function () {
///<summary>Returns a string representing the GUID id value for the record</summary>
///<returns type="String"/>
},
getIsDirty: function () {
///<summary>Returns a Boolean value that indicates if any fields in the form have been modified.</summary>
///<returns type="Boolean"/>
},
getEntityName: function () {
///<summary>Returns a string representing the logical name of the entity for the record.</summary>
///<returns type="String"/>
},
getDataXml: function () {
///<summary>Returns a string representing the xml that will be sent to the server when the record is saved.</summary>
///<returns type="String"/>
},
save: function (type) {
///<summary>Saves the record. </summary>
///<param name="type" type="String" optional="true">(Optional) No value save the records. "SaveAndClose" save then close the record. "SaveAndNew" save then open a new Create form.</param>
}
}
XrmTypes.Control.prototype = {
setNotification: function (message) {
///<summary>Setting a notification on a control will block the form from saving.</summary>
///<param name="type" type="String" optional="true">String: The message to display. </param>
},
clearNotification: function(){
///<summary>Clears the notification</summary>
},
addCustomView: function (viewId, entityName, viewDisplayName, fetchXml, layoutXml, isDefault) {
///<summary>Adds a new view for the lookup dialog.</summary>
///<param name="viewId" type="String">String: The string representation of a GUID Id for a view. This value is never saved and only needs to be unique amongst the other available views for the lookup. A string for a non-valid GUID will work, for example �{00000000-0000-0000-0000-000000000001}�.</param>
///<param name="entityName" type="String">The name of the entity.</param>
///<param name="viewDisplayName" type="String">The name of the view.</param>
///<param name="fetchXml" type="String">The fetchXml query for the view.</param>
///<param name="layoutXml" type="String">The XML defining the layout of the view.</param>
///<param name="isDefault" type="Boolean">Whether the view should be the default view.</param>
},
addOption: function (option, index) {
///<summary>Adds an option to an Option set control.</summary>
///<param name="option" type="XrmTypes.Option">An option object to add to the OptionSet.</param>
///<param name="index" type="Number"> (Optional) The index position to place the new option. If not provided the option will be added to the end.</param>
},
clearOptions: function () {
///<summary>Clears all options from an Option Set control.</summary>
},
getAttribute: function () {
///<summary>Returns the attribute that the control is bound to.</summary>
///<returns type="XrmTypes.Attribute"/>
},
getControlType: function () {
///<summary>Returns a value that categorizes controls. Return Value Description. Values 0: Standard, 1: Hidden, 2: IFrame, 3: Lookup, 4: Option Set, 5: SubGrid, 6: Web Resource</summary>
///<returns type="Number"/>
},
getDefaultView: function () {
///<summary>Returns the Id value of the default lookup dialog view.</summary>
///<returns type="String"/>
},
getDisabled: function () {
///<summary>Returns whether the control is disabled. This method is not available for Web Resource controls.</summary>
///<return type="Boolean"/>
},
getLabel: function () {
///<summary>Returns the label for the control.</summary>
///<returns type="String"/>
},
getName: function () {
///<summary>Returns the name assigned to the control.</summary>
///<returns type="String"/>
},
getParent: function () {
///<summary>Returns a reference to the section object that contains the control.</summary>
///<returns type="XrmTypes.Section"/>
},
getSrc: function () {
///<summary>Returns the current URL being displayed in an IFrame or Web Resource.</summary>
///<returns type="String"/>
},
getInitialUrl: function () {
///<summary>Returns the default URL that an IFrame control is configured to display. This method is not available for Web Resources.</summary>
///<returns type="String"/>
},
getObject: function () {
///<summary>Returns the object in the form representing an IFrame or Web resource.</summary>
///<returns type="Object"/>
},
getVisible: function () {
///<summary>Returns a value that indicates whether the control is currently visible.</summary>
///<returns type="Boolean"/>
},
refresh: function () {
///<summary>Refreshes the data displayed in a Sub-Grid.</summary>
},
removeOption: function (value) {
///<summary>Removes an option from an Option Set control.</summary>
///<param name="value" type="Number">The value of the option you want to remove.</param>
},
setDefaultView: function (viewGuid) {
///<summary>Sets the default view for the lookup control dialog.</summary>
///<param name="viewGuid" type="String"></param>
},
setDisabled: function (value) {
///<summary>Sets whether the control is disabled.</summary>
///<param name="value" type="Boolean"></param>
},
setFocus: function () {
///<summary>Sets the focus on the control</summary>
},
setLabel: function (label) {
///<summary>Sets the label for the control.</summary>
///<param name="label" type="String"></param>
},
setSrc: function (src) {
///<summary>Sets the URL to be displayed in an IFrame or Web Resource.</summary>
///<param name="src" type="String"></param>
},
setVisible: function (value) {
///<summary>Sets a value that indicates whether the control is visible.</summary>
///<param name="value" type="Boolean"></param>
}
};
XrmTypes.Attribute.prototype = {
addOnChange: function (delegate) {
///<summary>Sets a function to be called when the attribute value is changed.</summary>
///<param name="delegate" type="Delegate"></param>
},
fireOnChange: function () {
///<summary>Causes the OnChange event to occur on the attribute so that any script associated to that event can execute. </summary>
},
getAttributeType: function () {
///<summary>Returns a string value that represents the type of attribute.</summary>
///<returns type="Object"/>
},
getInitialValue: function () {
///<summary>Returns the default option for Boolean and optionset type attributes.</summary>
///<returns type="Object"/>
},
getFormat: function () {
///<summary>Returns a string value that represents formatting options for the attribute.</summary>
///<returns type="String"/>
},
getIsDirty: function () {
///<summary>Returns a Boolean value indicating if there are unsaved changes to the attribute value.</summary>
///<returns type="Boolean"/>
},
getMax: function () {
///<summary>Returns a number indicating the maximum allowed value for an attribute.</summary>
///<returns type="Number"/>
},
getMaxLength: function () {
///<summary>Returns a number indicating the maximum length of a string or memo attribute.</summary>
///<returns type="Number"/>
},
getMin: function () {
///<summary>Returns a number indicating the minimum allowed value for an attribute.</summary>
///<returns type="Number"/>
},
getName: function () {
///<summary>Returns a string representing the logical name of the attribute.</summary>
///<returns type="String"/>
},
getOption: function (value) {
///<summary>Returns an option object with the name matching the argument passed to the method.</summary>
///<param name="value">String or Number value</param>
///<returns type="XrmTypes.Option"/>
},
getOptions: function () {
///<summary>Returns an array of option objects representing the valid options for an optionset attribute.</summary>
///<returns type="Array"/>
},
getParent: function () {
///<summary>Returns the entity object that is the parent to the attribute.</summary>
///<returns type="XrmTypes.Entity"/>
},
getPrecision: function () {
///<summary>Returns the number of digits allowed to the right of the decimal point.</summary>
///<returns type="Number"/>
},
getRequiredLevel: function () {
///<summary>Sets whether data is required or recommended for the attribute before the record can be saved. One of the values 'none', 'required', 'recommended'.</summary>
///<returns type="String"/>
},
getSelectedOption: function () {
///<summary>Returns the option object that is selected in an optionset attribute..</summary>
///<returns type="XrmTypes.Option"/>
},
getSubmitMode: function () {
///<summary>Returns a string indicating when data from the attribute will be submitted when the record is saved. One of the values 'allways', 'never', 'dirty'.</summary>
///<returns type="String"/>
},
getText: function () {
///<summary>Returns a string value of the text for the currently selected option for an optionset attribute.</summary>
///<returns type="String"/>
},
getUserPrivilege: function () {
///<summary>Returns an array of privileges that contain Boolean values indicating if the user can create, read or update data values for an attribute.</summary>
///<returns type="String"/>
},
getValue: function () {
///<summary>Retrieves the data value for an attribute.</summary>
///<returns type="Object"/>
},
removeOnChange: function (delegate) {
///<summary>Removes a function from the OnChange event hander for an attribute.</summary>
///<param name="delegate" type="Delegate"/>
},
setRequiredLevel: function (value) {
///<summary>Sets whether data is required or recommended for the attribute before the record can be saved.</summary>
///<param name="value" type="String">One of the values 'none', 'required', 'recommended'.</param>
},
setSubmitMode: function (value) {
///<summary>Sets whether data from the attribute will be submitted when the record is saved.</summary>
///<param name="value" type="String">One of the values 'always', 'never', 'dirty'.</param>
},
setValue: function (value) {
///<summary>Sets the data value for an attribute. For lookups, use:</summary>
///<param name="value" type="Object"/>
}
};
XrmTypes.Option.prototype = {
text: '',
value: 0
}
XrmTypes.Lookup.prototype = {
entityType: '',
id: 0,
name: 0
}
XrmTypes.Context.prototype = {
getClient: function () {
///<summary>Returns a value to indicate which client the script is executing in.</summary>
///<returns type="String">Web, Oulook, Mobile</returns>
},
getAuthenticationHeader: function () {
///<summary>Returns the encoded SOAP header necessary to use Microsoft Dynamics CRM 4.0 web service calls using Jscript. </summary>
///<returns type="String"/>
},
getCurrentTheme: function () {
///<summary>Returns a string representing the current Microsoft Office Outlook theme chosen by the user.</summary>
///<returns type="String"/>
},
getOrgLcid: function () {
///<summary>Returns the LCID value that represents the Microsoft Dynamics CRM Language Pack that is the base language for the organization. </summary>
///<returns type="Number"/>
},
getOrgUniqueName: function () {
///<summary>Returns the unique text value of the organizations name. </summary>
///<returns type="String"/>
},
getQueryStringParameters: function () {
///<summary>Returns an array of key value pairs representing the query string arguments that were passed to the page. </summary>
///<returns type="Array"/>
},
getServerUrl: function () {
///<summary>Returns the base server URL. When a user is working offline with the Microsoft Dynamics CRM for Microsoft Office Outlook client, the URL is to the local Microsoft Dynamics CRM Web services. </summary>
///<returns type="String"/>
},
getUserId: function () {
///<summary>Returns GUID value of the SystemUser.id value for the current user. </summary>
///<returns type="String"/>
},
getUserName: function () {
///<summary>Returns String value of the SystemUser. </summary>
///<returns type="String"/>
},
getUserLcid: function () {
///<summary>Returns the LCID value that represents the Microsoft Dynamics CRM Language Pack that is the user selected as their preferred language. </summary>
///<returns type="Number"/>
},
getUserRoles: function () {
///<summary>Returns an array of strings representing the GUID values of each of the security roles that the user is associated with. </summary>
///<returns type="Array"/>
},
isOutlookClient: function () {
///<summary>(DEPRACATED use getClient)Returns a Boolean value indicating if the user is using the Microsoft Dynamics CRM for Microsoft Office Outlook client.</summary>
//<returns type="Boolean"/>
},
isOutlookOnline: function () {
///<summary>Returns a Boolean value indicating whether the user is connected to the Microsoft Dynamics CRM server while using the Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access client. When this function returns false, the user is working offline without a connection to the server. They are interacting with an instance of Microsoft Dynamics CRM running on their local computer.</summary>
//<returns type="Boolean"/>
},
prependOrgName: function (sPath) {
///<summary>Prepends the organization name to the specified path.</summary>
///<param name="sPath" type="String">A local path to a resource.</param>
///<returns type="String"/>
}
};
var Xrm = new XrmTypes.Xrm();
function GetGlobalContext() {
///<returns type="XrmTypes.Context"/>
}