Skip to content

Add support for offline mode #14

@drivardxrm

Description

@drivardxrm

Based on a comment on my blog


Hi David,

Thanks for your response! Seriously you have created an amazing tool here!

I would agree that fetching the data at runtime seems to be the issue. When I am using the control offline, it displays, but no records show up in the control (i.e. just displays “–Select–“). I think all that would need to be done to make the control work offline would be:

  1. Call Xrm.Utility.getGlobalContext().client.getClientState() to return whether the device is offline
  2. I’m not sure how you are fetching the data at runtime (fetch query, odata, etc), but you could then pipe the fetch function through the Xrm.WebApi.offline if the client state was offline

The person using it would need to have all the records in the table in the offline profile, but this makes sense to me since we generally use this PCF for metadata records. In other works, there should only be a handful of such records in a given table, so downloading all of them wouldn’t be such a big deal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions