Overview:
HTML Reports work without issue in CRM Online, but not in offline CRM (iPad/Windows), or vice versa.
Root Cause:
There are a few behavior differences in the Veeva MyInsights JavaScript library between the different platforms. Example: HTML reports work differently on different platforms. This is ultimately due to the differences between the Databases queried.
Our Development team is working on the best way to align these differences at a future date.
Issue | Online | iPad | Windows |
Boolean fields | true/false (boolean) | iPad - 1, 0 (number) | "True", "False" (string) |
When there is no value returned for the selected field | null | Number-type field: fieldName = null Non-Number field: fieldName = "" (empty string) |
Number-type field: fieldName IS null Non-Number field: fieldName = "" (empty string) |
In the return object from getDataForCurrentObject() | "ID" | The property name matches the case from the query field e.g. "Id" or "ID" |
same as iPad |
When selecting Date/DateTime/Time/Boolean fields | 2/1/2018 | "2018-02-01" (require the value to be surrounded by quotes) | same as iPad |
When querying with boolean fields in "where" | true/false (boolean) | either case work: - true/false (boolean) -"true"/"false" (as string, surrounded by quotes) |
"true"/"false" (as string, surrounded by quotes) |
When querying field with no value in "where" | the empty value needs to be specified as null | the empty value needs to be specified as ' ' (empty string) | same as iPad |
Case sensitiveness of Object API names and Field API names | Insensitive | Sensitive | Insensitive |
Number field | 0,1,2... | 0,1,2... | "0","1","2"... (in string) |
Solution:
HTML reports that are designed for use on different platforms will require additional logic and testing to ensure that these differences do not cause issues.