A report that gives list of Number of records in each table for each company

Aditya546Aditya546 Posts: 6Member
I'm using nav 2016. But i'm getting the run time error: ' you do not have the following permissions on the TableData service password:Read'


i wrote this code in the report. contributed by #TallyHo.

Object - OnAfterGetRecord()

TheRecRef.OPEN(Object.ID);
NumberOfRecords:= TheRecRef.COUNT;
TheRecRef.CLOSE;

Answers

  • TallyHoTallyHo Posts: 156Member
    edited 2019-04-12
    Try this
    TheRecRef.OPEN(Object.ID);
    if TheRecRef.READPERMISSION then
    NumberOfRecords:= TheRecRef.COUNT
    else
    clear(NumberOfRecords);
    TheRecRef.CLOSE;

  • Aditya546Aditya546 Posts: 6Member
    Table connection for table type CRM must be registered using RegisterTableConnection or cmdlet New-NavTableConnection before it can be used
  • krikikriki Posts: 8,689Member, Moderator
    [Topic moved from 'Navision Financials' forum to 'NAV Three Tier' forum]

    Regards,Alain Krikilion
    Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
    NAV TechDays 2019: 21 & 22 November 2019, Antwerp (Belgium)
Sign In or Register to comment.