@veeva/myinsights_javascript_library
v0.0.9
Published
MyInsights Javascript Library
Downloads
1
Readme
Table of Contents
- DataAccessLibrary
- queryRecord
- runQuery
- querySalesData
- joinQueries
- getInStatement
- getDataForCurrentObject
- getObjectLabels
- getFieldLabels
- getPicklistValueLabels
- getVeevaMessagesWithDefault
- checkQueryQueue
- newRecord
- viewRecord
- smartLinking
- executeSuggestionAction
- launchMediaForAccount
- getAvailableObjects
- getObjectMetadata
- getRecordTypeLabels
- queryVDSRecord
- OnlineAPI
- Utilities
DataAccessLibrary
queryRecord
Parameters
queryObject
Object
Returns Promise
runQuery
Parameters
queryConfig
Object
Returns Promise
querySalesData
Parameters
queryObject
Object
Returns Promise
joinQueries
Parameters
q1
Object The query to which to outerjoin q2q2
Object The query to which to outerjoin to q1keyForID
String The member name of what to consider as the primary keyfieldsLabelsToExclude
ArrayprimaryObjectName
String The object name assigned to the query desired to be the primary query to which to join the non-primary query.
Returns Object Joined query result
getInStatement
Generates an in-statment fragment to be included in a query.
Parameters
ids
Array the ids to include in the generated in-statement
Returns string In-statement to use in a query
getDataForCurrentObject
Returns the value of a field for a specific record related to the current object
Parameters
object
String The api name of the object on which the field can be found.field
String The name of the field whose value you want returned.
Returns Promise
getObjectLabels
Parameters
objects
Array API names of objects for which to retrieve object labels.
Returns Promise
getFieldLabels
Parameters
queryConfig
Object
Returns Promise
getPicklistValueLabels
Returns the translated label for each of the picklist values of the specified field
Parameters
Returns Promise
getVeevaMessagesWithDefault
Parameters
tokens
Array The tokens for which to get translationslanguageLocaleKey
String Locale key of the translations to return.
Returns Promise
checkQueryQueue
Returns Promise
newRecord
Parameters
configObject
Object
Returns Promise
viewRecord
Parameters
configObject
Object
Returns Promise
smartLinking
Parameters
configObject
Object
Returns Promise
executeSuggestionAction
Parameters
Returns Promise
launchMediaForAccount
Parameters
Returns Promise
getAvailableObjects
Returns Promise
getObjectMetadata
Parameters
queryObject
Object
Returns Promise
getRecordTypeLabels
Parameters
objectName
String
Returns Promise
queryVDSRecord
CDW Query Record
Parameters
configObject
Object
Returns Promise
Meta
- copyright: All rights reserved
OnlineAPI
Extends DataAccessLibrary
Overrides for the online environment.
genericQueryErrorHandler
Parameters
e
Object Error
Returns null
queryRecord
Parameters
queryObject
Object
Returns Promise
querySalesData
Parameters
queryObject
Object
Returns Promise
query
Parameters
queryConfig
Object
Returns Promise
getDataForCurrentObject
Returns the value of a field for a specific record related to the current object
Parameters
object
String The api name of the object on which the field can be found.field
String The name of the field whose value you want returned.
Returns Promise
getObjectLabels
Parameters
objects
Array API names of objects for which to retrieve object labels.
Returns Promise
getFieldLabels
Parameters
queryConfig
Object
Returns Promise
getTranslation
Parameters
Returns Promise
getPicklistValueLabels
Returns the translated label for each of the picklist values of the specified field
Parameters
Returns Promise
newRecord
Parameters
configObject
Object
Returns Promise
viewRecord
Parameters
configObject
Object
Returns Promise
smartLinking
Parameters
configObject
Object
Returns Promise
getAvailableObjects
Returns Promise
getObjectMetadata
Parameters
queryObject
Object
Returns Promise
getRecordTypeLabels
Parameters
objectName
String
Returns Promise
Utilities
Provided for your convenience.
isWin8
Returns Boolean Returns true if the client is Windows 8
isOnline
Returns Boolean
addMessageListener
Adds a listener for the rest api call callback
Parameters
callback
Function Listener function
Returns Function The callback function passed in.
removeMessageListener
Parameters
callback
Function Listener function to remove
Returns undefined
mergeObjects
Parameters
dst
object Source of truth object to which to add members from src object.src
object Object from which to copy members to dstclobber
boolean Boolean to indicate if src members should override dst members.
Returns object
copyObject
Parameters
obj
Object Object to copy
Returns Object
deepCopy
Parameters
originalObject
Object The object to copy.
Returns Object
replaceStringInWhereClause
Parameters
whereClause
Stringinput
String String to use in place of stringToBeReplacedstringToBeReplaced
String The string to replace with the input.
Returns String