Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: setting nextmarker in AFSFileClientImpl.codeunit results in an error if nothing is found #1409

Closed
1 task done
Pieterheinevdm opened this issue Jun 26, 2024 · 6 comments · Fixed by #1408
Closed
1 task done
Labels
Approved The issue is approved Bug Something isn't working

Comments

@Pieterheinevdm
Copy link
Contributor

Describe the issue

if NodeList is empty no temprecords are beiing inserted and an error will occur because of the modify on an not inserted temprecord

Expected behavior

Nextmarker is always blank if nothing is found, so setting this is not needed

Steps to reproduce

Make AFS return no result. For examply by setting Prefix to ABCDEFG a non existing file name.

Additional context

No response

I will provide a fix for a bug

  • I will provide a fix for a bug
@SlavaGeorgiev
Copy link

created a fix rather there is no "Next Marker" or the table AFSDirectoryContent is empty.

SlavaGeorgiev pushed a commit to SlavaGeorgiev/BCApps that referenced this issue Jun 27, 2024
SlavaGeorgiev pushed a commit to SlavaGeorgiev/BCApps that referenced this issue Jun 27, 2024
@JesperSchulz JesperSchulz added the Approved The issue is approved label Jul 1, 2024
@JesperSchulz
Copy link
Contributor

@Pieterheinevdm / @SlavaGeorgiev, you've both linked a PR to this issue. Are both needed, or are they both addressing the same issue in different ways?

@SlavaGeorgiev
Copy link

@Pieterheinevdm / @SlavaGeorgiev, you've both linked a PR to this issue. Are both needed, or are they both addressing the same issue in different ways?

imo both addressing the same issue in different ways @JesperSchulz

@JesperSchulz
Copy link
Contributor

@Pieterheinevdm / @SlavaGeorgiev, so which solution should I pick? Any preference?

@SlavaGeorgiev
Copy link

@Pieterheinevdm / @SlavaGeorgiev, so which solution should I pick? Any preference?

Good question @JesperSchulz

@Pieterheinevdm - his PR fixes the issue in case the EntryNo isn't equal to zero.
My PR avoids a modify if there is no NextMarker and the directory is empty.

In case this helps.

@Pieterheinevdm
Copy link
Contributor Author

both will do the job, my change is cleaner, but I won't mind which one you choose.

JesperSchulz pushed a commit that referenced this issue Aug 27, 2024
if NodeList is empty no temprecords are beiing inserted and an error
will occur because of the modify on an not inserted temprecord

<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes #1409

Fixes
[AB#540616](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/540616)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved The issue is approved Bug Something isn't working
Projects
None yet
3 participants