moussa-e
10/11/2016 - 7:12 AM

CRM 2016 #North52 #MoussaElAnnan

CRM 2016 #North52 #MoussaElAnnan

Description: 
Shows one or more tabs on a form. 

Signature: 
ShowTabs('tabname') 

Example:
ShowTabs('general', 'administrative')
Description: 
Shows one or more sections on a form. 

Signature: 
ShowSections('tabname.sectionname') 

Example:
ShowSections('general.notes', 'general.contact')
Description: 
Shows one or more fields on a form. 

Signature: 
ShowFields('fieldname') 

Example:
ShowFields('name', 'description')
Description: 
Sets one or more fields to be required. 

Signature: 
SetRequiredFields('fieldname') 

Example:
SetRequiredFields('name', 'description')
Description: 
Sets the available picklist values. 

Primarily used to filter picklist when they are dependent on another field.

The first parameter is the optionset field name, the second is a boolean which if true will include an empty option set value. 
For records with no saved optionset value the first item in the list will be the default if the empty parameter does not exist. 

Then you can pass in a list of optionset values, only these will display in the picklist. 

Signature: 
SetPicklistValues('field', 'emptyvalue', 'optionsetvalue', 'optionsetvalue') 

Example:
SetPicklistValues('address1_shippingmethodcode', 'true', 1,2,3)
Description: 
Sets one or more fields to be not required. 

Signature: 
SetNotRequiredFields('fieldname') 

Example:
SetNotRequiredFields('name', 'description')
Description: 
Set an iframe. 

Signature: 
SetIFrame('iframecontrol', 'websiteaddress') 

Example:
SetIFrame('IFRAME_web', 'http://www.microsoft.com')
Description: 
Set the focus on a field. 

Signature: 
SetFocus('fieldname') 

Example:
SetFocus('description')
Description: 
Set a default view. 

Signature: 
SetDefaultView('lookup', 'viewid') 

Example:
SetDefaultView('customerid', '630dd379c-ee2f-11db-8314-0800200c9a5')
Description: 
Set a field to the data it has plus some new data. 

Signature: 
SetClientSideFieldAppend('fieldname', 'datatoappend') 

Example:
SetClientSideFieldAppend('description', ' Hello from North52')
Description: 
Set a field on the client side. 

Shows how to set all field types excep 

Signature: 
SetClientSideField('fieldname', 'fieldvalue') 

Example:
e.g. SetClientSideField('lastname', 'Gates'), 

Shows how to set lookup fields e.g. SetClientSideField('parentcustomerid', 'account', '10124ac3-0f6f-40dd-be64-d8c0bc5dbfbd', 'Microsoft' )
Description: 
Selects a given form. The input parameter is the index number of the list of forms, starting at zero 

Signature: 
SelectForm('formid') 

Example:
SelectForm('0')
Description: 
Remove a pre filter lookup to the controlid. 

Signature: 
RemovePreFilterLookup('controlid') 

Example:
RemovePreFilterLookup('parentaccountid')
Description: 
Refresh a web-resource. 

Signature: 
RefreshWebResource('webresource') 

Example:
RefreshWebResource('IFRAME_webpage')
Description: 
Refresh a subgrid. 

Signature: 
RefreshSubGrid('gridname') 

Example:
RefreshSubGrid('gridname')
Description: 
Refresh the form. Add true to save any data otherwise false 

Signature: 
RefreshForm('boolean') 

Example:
RefreshForm('true')
Description: 
Opens a new window given a url 

Signature: 
OpenWindow('url') 
Description: 
Opens a new entity form 

e.g. Open a specif 

Signature: 
OpenEntityForm('name', 'id') 

Example:
OpenEntityForm('account', '10124ac3-0f6f-40dd-be64-d8c0bc5dbfbd') 

e.g. Open a new account record OpenEntityForm('account', 'null')
Description: 
Executes multiple client side actions. 

Signature: 
MultipleClientSide('action1', 'action2') 

Example:
MultipleClientSide(SetClientSideField('lastname', 'Test'), DisableFields('firstname', 'lastname'), ClearFields('firstname'))
Description: 
Hides one or more tabs on a form. 

Signature: 
HideTabs('tabname') 

Example:
HideTabs('general', 'administrative')
Description: 
Hides one or more sections on a form. 

Signature: 
HideSections('tabname.sectionname') 

Example:
HideSections('general.notes', 'general.contact')    
Description: 
Hides one or more fields on a form. 

Signature: 
HideFields('fieldname') 

Example:
HideFields('name', 'description')
Description: 
Expands a tab. 

Signature: 
ExpandTabs('tab') 

Example:
ExpandTabs('tab1', 'tab2')
Description: 
Executes a workflow. 

Signature: 
ExecuteWorkflow('workflowname', 'recordguid') 

Example:
ExecuteWorkflow('Onboard Prospect', '873489c-992f-22db-8454-0800255c9a55')
Description: 
Executes a dialog. 

Signature: 
ExecuteDialog('dialogname') 

Example:
ExecuteDialog('Onboard Client')
Description: 
Enables one or more fields on a form. 

Signature: 
EnableFields('fieldname') 

Example:
EnableFields('name', 'description') 

EnableFields('*')
Description: 
Disables one or more fields on a form. 

Signature: 
DisableFields('fieldname') 

Example:
DisableFields('name', 'description') 

DisableFields('*')
Description: 
Collapses a tab. 

Signature: 
CollapseTabs('tab') 

Example:
CollapseTabs('tab1', 'tab2')
Description: 
Clears the contents of any fields. 

Signature: 
ClearFields('fieldname') 

Example:
ClearFields('name', 'description')
Description: 
Sets the active business process stage for the current record 

Signature: 
BPSetActiveStage('processname', 'stagename') 

Example:
BPSetActiveStage('Opportunity Sales Process', 'Develop')
Description: 
Sets the active business process for the current record 

Signature: 
BPSetActiveProcess('processname') 

Example:
BPSetActiveProcess('Opportunity Sales Process')
Description: 
Moves the business process to the previous stage 

Signature: 
BPMovePreviousStage() 

Example:
BPMovePreviousNextStage()
Description: 
Moves the business process to the next stage 

Signature: 
BPMoveNextStage() 

Example:
BPMoveNextStage()
AddPreFilterLookup Description:  Adds a pre filter lookup to the controlid.   
Usage:  AddPreFilterLookup('controlid', 'formulashortcode', 'filter', 'entityfilter')   
Example: AddPreFilterLookup('parentaccountid', 'ab5', 'fetchxml_fragment', 'account')
AddCustomView Description:  Provides the ability to add a custom view to a lookup control.  
Usage:  
AddCustomView('controlname', 'entitylogicalname', 'nameofview', 'FetchXml', 'LayoutXml', 'isDefault')  
Example: AddCustomView('preferredsystemuserid', 'systemuser', 'Only users in Canada BU', GetFetchXML('CanadaUsers'), GetLayoutXML('CanadaUsers'), false)