Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

System Message 10092: Specified record type "csr_xxxx" is not in the current view. Context: insert

(0) ShareShare
ReportReport
Posted on by 1,245

Using Customization Manager,  I have added following code on 40.100.00 screen in Update1_OnUpdate subroutine to add/update record to the underlying custom table:

Dim CpnyId As String, OrdNbr As String, line As String, csr_XLeeTB as Integer
Dim intFetch As Integer, strSql As String

Call GetBufferValue("bpes.cpnyid", CpnyId)
OrdNbr = GetObjectValue("cordnbr_0")
Call GetBufferValue("bsoline.lineref", line)

strSql = "select * from XLeeTB_CostSalesExt where CpnyID = " + SParm(CpnyId) + " and Module = " + SParm("OM") + " and ModDocNbr = " + SParm(OrdNbr) + " and LineRef = " + SParm(line)

Call SqlCursorEx(csr_XLeeTB, NOLEVEL, "csr_XLeeTB", "XLeeTB_CostSalesExt", "XLeeTB_CostSalesExt")
intFetch = SqlFetch1(csr_XLeeTB, strSql, bXLeeTB_CostSalesExt, LenB(nXLeeTB_CostSalesExt))

....
fill up bXLeeTB_CostSalesExt record here
....

If intFetch = NOTFOUND Then
   Call SInsert1(csr_XLeeTB, "csr_XLeeTB", bXLeeTB_CostSalesExt, LenB(nXLeeTB_CostSalesExt))
Else
  Call SUpdate1(csr_XLeeTB, "csr_XLeeTB", bXLeeTB_CostSalesExt, LenB(nXLeeTB_CostSalesExt))
End If

Call SqlFree(csr_XLeeTB)

I keep getting the above error (as stated in the subject line) when it hits the SInsert1 statement.  Anyone experienced this issue?  What does error indicate and what is missing in the above code?

Any help/suggestions/pointers are greatly appreciated.

Thanks in advance.

Nayan

*This post is locked for comments

  • hernandezla Profile Picture
    25 on at
    Re: System Message 10092: Specified record type "csr_xxxx" is not in the current view. Context: insert

    Barry

    Thanks for the answer mi problem was the table name

  • Barry Flynn Profile Picture
    3,090 on at
    Re: System Message 10092: Specified record type "csr_xxxx" is not in the current view. Context: insert

    Antonio

    I believe there are a couple of errors in that code.

    Two of them are in the sInsert1 & sUpdate1 calls.

       << Call SInsert1(csr_XLeeTB, "csr_XLeeTB", bXLeeTB_CostSalesExt, LenB(nXLeeTB_CostSalesExt))

    The second parameter shoudl be the table name.

    It isn't - it appears to be the cursor instead.

    So, on the face of it, that call shoudl be

       Call SInsert1(csr_XLeeTB, "XLeeTB_CostSalesExt", bXLeeTB_CostSalesExt, LenB(nXLeeTB_CostSalesExt))

    Same deal for the sUpdate call.

    I'm a little concerned about the length of that table name.

    SL does not always like tables with long names.

    Offhand though, I'm not sure what the limit is.

    A final point.

    In many screens, the Update event fires multiplw times - once per Level being Saved.

    So it is likely that the entire code shoudl be inside an IF statement, so that it is executed only once per SAVE.

    Hope those comments help.

    Barry

  • Community Member Profile Picture
    on at
    Re: System Message 10092: Specified record type "csr_xxxx" is not in the current view. Context: insert

    Can you resolve your problems? I have the same

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

#1
Community Member Profile Picture

Community Member 136

#2
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 102 Super User 2025 Season 1

#3
REUser Profile Picture

REUser 8

Featured topics

Product updates

Dynamics 365 release plans