Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Suggested answer

Mobile App Offline JavaScript Xrm.WebApi.offline.createRecord()

Posted on by 40

Hello,

I am attempting to create a record in Field Service Mobile while in offline mode.

using Xrm.WebApi.offline.createRecord(table,data) method the record is not being created.

I am not getting any errors. 

could not find any issues debugging using the following method.

https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/debug-javascript-code#debug-javascript-in-mobile-apps

I use the same 'data' variable when online using Xrm.WebApi.online.createRecord(table,data) method and the record is successfully created.

the table I am trying to create the record for is enabled in offline.

the tables associated with lookup columns I am populating with @odata.bind are all enabled for offline mobile and the records in those tables are in the offline profile.

I made sure all columns that are listed as required are included in my 'data' variable. 

pastedimage1679596201851v1.png

any insights to what I might be overlooking?

Thanks,

  • Suggested answer
    Thomas David Dayman Profile Picture
    Thomas David Dayman 11,323 on at
    RE: Mobile App Offline JavaScript Xrm.WebApi.offline.createRecord()

    www.daymandynamics.com/.../

    Try and use mobile debugging to try and figure what is happening?

    I use the syntax Xrm.WebApi.createRecord(table,data) without the 'online' or 'offline' and it works for both online and offline mode.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans