Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

SQL CAN NOT FIND data

(0) ShareShare
ReportReport
Posted on by 113

pastedimage1675911228414v2.png  pastedimage1675911290646v3.png why  i  can  not get this record with  x++?i  use the  same  database  and  same param

  • GirishS Profile Picture
    GirishS 27,816 Super User 2024 Season 1 on at
    RE: SQL CAN NOT FIND data

    First try to find the account number for the record "SNFREFIDCUSTONNIS" (123772).

    In the select statement add the account num field in the where condition - On the debugger see whether the "SNFREFIDCUSTONNIS" field has value 123772.

    Thanks,

    Girish S.

  • Tracy wang Profile Picture
    Tracy wang 113 on at
    RE: SQL CAN NOT FIND data

    yes ,I have tried to do this in the code, but still can't get it

  • GirishS Profile Picture
    GirishS 27,816 Super User 2024 Season 1 on at
    RE: SQL CAN NOT FIND data

    Try like below. SNFREFIDCUSTONNIS is integer or string field.

    If its a string field use double quotes to mention.

    Select crossCompany * from custTable
        where custTable.SNFREFIDCUSTONNIS == "123772";

    Also open the table and see whether the same record exists.

    Thanks,

    Girish S.

  • Tracy wang Profile Picture
    Tracy wang 113 on at
    RE: SQL CAN NOT FIND data

    To say the least, i use  crosscompany   to  query  ,it  also  can  not get record

  • Tracy wang Profile Picture
    Tracy wang 113 on at
    RE: SQL CAN NOT FIND data

    But the information in this company is the result of a database query,

  • Suggested answer
    GirishS Profile Picture
    GirishS 27,816 Super User 2024 Season 1 on at
    RE: SQL CAN NOT FIND data

    Hi Tracy,

    On the select statement use cross company keyword to get data across all the companies.

    CustTable will have SaveDataPerCompany property on the table is said to yes - Which means that it will save records against each company separately.

    In order to get the record against all the companies you need to use crossCompany keyword in select statement.

    Normally the select statement will run against the current logged in company ID.

    Thanks,

    Girish S.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,433 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans