web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Error in Mobile Expens...
Finance forum

Error in Mobile Expense application

(0) ShareShare
ReportReport
Posted on by 4,071

I am trying to enter an Expense in the Dynamics 365 Unified Operation mobile App, but I am getting this error.

The value '5637144587' in field 'Location' is not found in the related table 'Travel locations'

So it would seem to me that the application is trying to insert a record into the table TrvExpTrans with the value 5637144587 in the field TrvLocations

But I have tried to debug D365FO on the insert trigger of TrvExpTrans, and the debugger does stop on the code, but the field TrvLocations does not contain that value, and no other field seems to have that value ether.

And it does look like a record is created in the table, (After several retries in the Mobils App I now have several records in the table)

But I am still getting the error in the mobile app, and I am not able to enter any new expenses.

I have also tried to debug the actual Mobile App using the method mentioned in this (https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/mobile-apps/platform/mobile-platform-home-page)

But I have not figured out where in the Java code its actually getting the error, or where its trying to send the data to D365FO.

No changes had been made to the code in D365FO or the Mobile App.

D365FO is version Update24 (7.0.5179.35390)

And the Mobile App is version Version 2.2.4 on Android. 

Categories:
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    299,403 Super User 2025 Season 2 on at
    RE: Error in Mobile Expense application

    Hi Rudi,

    The location field is a reference to a contact/person location which could be a phone number, email or postal address. So, possibly a record in the table LogisticsLocation/TrvLocations got deleted somehow or in another way, it now contains an incorrect value.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Error in Mobile Expense application

    In expense management module, what locations you see under - setup - travel locations?

    Can the same transaction be carried out in D365FO? If no then troubleshooting in D365FO would be easier compared to mobile app

  • Rudi Hansen Profile Picture
    4,071 on at
    RE: Error in Mobile Expense application

    I did search through the entire D365FO Database to look for the value 5637144587, to check if it was a reference to something that might not exist.

    But I found nothing relevant, (Since recid's are not database unique anymore I did find it in a lot of tables but none that seemed relevant)

    So do you have any idea where the mobile app gets that recid from?

  • Rudi Hansen Profile Picture
    4,071 on at
    RE: Error in Mobile Expense application

    [quote user=""Rahul"][/quote]

    In expense management module, what locations you see under - setup - travel locations?

    Can the same transaction be carried out in D365FO? If no then troubleshooting in D365FO would be easier compared to mobile app

    None its empty.

    And yes I can do the transaction in D365FO without any errors, the transaction even shows up in D365FO then I do it from the mobile app.

    But since I get the error in the Mobile app, I can't make new records since it will not allow new entries before this one is synced.

  • Verified answer
    Rudi Hansen Profile Picture
    4,071 on at
    RE: Error in Mobile Expense application

    Ok it seems i found the problem, I was trying to add the missing record in the TrvLocations table, and saw that it had the Configuration Key TrvPerDiem.

    So after enabling that Configkey the error disappeared.

    So not the real question is why is it failing on a table that is not enabled that seems to be an error in the Mobile Application.

    But at least for now i have gotten the application to work.

  • André Arnaud de Calavon Profile Picture
    299,403 Super User 2025 Season 2 on at
    RE: Error in Mobile Expense application

    Hi Rudi,

    Thanks for your feedback on the findings. There are indeed sometimes issues related to disabled configuration keys. I will mark your answer as it is the solution for your question.

  • Rudi Hansen Profile Picture
    4,071 on at
    RE: Error in Mobile Expense application

    One extra question about this issue.

    If I disable the TrvPerDiem config key again, then I get the error again, and as I mentioned before I have been trying to figure out where the value 5637144587 was coming from.

    And I finally found it, in the AOT under Resources there is a resource ExpenseMobileApp, and witch points to the file K:\AosService\PackagesLocalDirectory\ExpenseMobile\ExpenseMobile\AxResource\ResourceContent\XmlDoc\Expense management.xml

    And in that file the value 5637144587 occurs two times, with something like this:

    <d2p1:UserActionType>Input</d2p1:UserActionType>

    <d2p1:Value>5637144587</d2p1:Value>

    (It's kind of hard to explain where in the file it is, and might now even be relavant)

    So now I cleared the value from this file, saved the file and did a complete build of D365FO, and the error is now gone.

    My question is, is there anything wrong with editing this file?

    The reason I ask is VS tells me that the file is write protected, but that i can override the write protection.

  • André Arnaud de Calavon Profile Picture
    299,403 Super User 2025 Season 2 on at
    RE: Error in Mobile Expense application

    Hi Rudi,

    As this is an object from the standard application, you should not edit this file. You can actually in a development environment, but you cannot deploy this type of changes to a production environment. Editing the file would be an "overlayering" which is not allowed anymore for standard Microsoft Dynamics application objects.

  • Rudi Hansen Profile Picture
    4,071 on at
    RE: Error in Mobile Expense application

    Ok so does that mean that its not something I can correct, I need to have Microsoft correct this issue?

    I did check the Expense management.xml file on a clean/new DEV environment, and that one has that same RecId in the same place.

    And I was very surprised to see a RecId value hard coded in a standard file, how can that work anywhere??

  • André Arnaud de Calavon Profile Picture
    299,403 Super User 2025 Season 2 on at
    RE: Error in Mobile Expense application

    Hi Rudi,

    In some cases, Microsoft can/will rely on a certain number as they do control the values. I don't know the purpose of the coding or where it has been used, so cannot judge on it. You can actually create an incident for Microsoft support and see if they confirm your findings.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans