OnAfterGetCurrRecord - code crashes NAV client

Damjan
Member Posts: 94
Hi All,
issue: Page ID 5076 - Interaction Log Entries has some code in OnAfterGetCurrRecord where code that loads and displays comments in the FactBox Comments (linked to record of T5065 - "Interaction Log Entry") and another code in OnAfterGetCurrRecord of same page saves edited content of comments crashes the NAV client as user sorts on any column of PG5076 - "Interaction Log Entries".
There is an Add-in executed as FactBox (page Comments) is being loaded.
version: NAV 2013 R2
Code in OnAfterGetCurrRecor in PG5076 - Interaction Log Entries:
User steps:
1. Open NAV
2. Go to Contacts -> Page Contacts is displayed as expected
3. select any contact -> record is selected as expected
4. click on NAVIGATE -> click on button "Interaction Log Entries" ->
- Page ID 5076 - "Interaction Log Entries" is opened as expected
- record of contact interactions are loaded as expected
- FactBox "Comments" on Page ID 5076 is displayed as expected

procedure
-> code
-> code
Issue is present if user tries to sort on any column where at least 1 entry (record) has a comment then the NAV cline freezes and NAV client crashes
Issue is not present if I remove upper code from OnAfterGetCurrRecord to OnAfterGetRecord, but then all the comments are being loaded (I know why the comments are loaded and I do not want such behaviour).
Thanks, Damjan
issue: Page ID 5076 - Interaction Log Entries has some code in OnAfterGetCurrRecord where code that loads and displays comments in the FactBox Comments (linked to record of T5065 - "Interaction Log Entry") and another code in OnAfterGetCurrRecord of same page saves edited content of comments crashes the NAV client as user sorts on any column of PG5076 - "Interaction Log Entries".
There is an Add-in executed as FactBox (page Comments) is being loaded.
version: NAV 2013 R2
Code in OnAfterGetCurrRecor in PG5076 - Interaction Log Entries:
CurrPage.editPart.PAGE.SetBT(xRec."Entry No."); CurrPage.editPart.PAGE.GetBT("Entry No.");
User steps:
1. Open NAV
2. Go to Contacts -> Page Contacts is displayed as expected
3. select any contact -> record is selected as expected
4. click on NAVIGATE -> click on button "Interaction Log Entries" ->
- Page ID 5076 - "Interaction Log Entries" is opened as expected
- record of contact interactions are loaded as expected
- FactBox "Comments" on Page ID 5076 is displayed as expected

procedure
CurrPage.editPart.PAGE.GetBT("Entry No.");and
CurrPage.editPart.PAGE.SetBT(xRec."Entry No.");runs Add-in which is handling loading and saving part of comments
-> code
CurrPage.editPart.PAGE.GetBT("Entry No.");=> as user selects a record in PG5076 code
CurrPage.editPart.PAGE.GetBT("Entry No.")checks if any comments exists for that entry (record) and then loads these comments in the FactBox Comments,
-> code
CurrPage.editPart.PAGE.SetBT(xRec."Entry No.");=> as user edits (insert, modify, delete text/content) comment code
CurrPage.editPart.PAGE.SetBT(xRec."Entry No.");saves the comment
Issue is present if user tries to sort on any column where at least 1 entry (record) has a comment then the NAV cline freezes and NAV client crashes
Issue is not present if I remove upper code from OnAfterGetCurrRecord to OnAfterGetRecord, but then all the comments are being loaded (I know why the comments are loaded and I do not want such behaviour).
Thanks, Damjan
0
Answers
-
I found out that if Page Interaction Log Entries is not opened in full window mode, sorting on any fields works as expected (see below)
As user maximises the page and then tries to sort on any field, the NAV client crashes.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions