# Sometime function is not executing even after call with proper parameter

**URL:** <https://pdfjs.community/t/sometime-function-is-not-executing-even-after-call-with-proper-parameter/38>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [May 28, 2020, 1:56pm UTC](https://pdfjs.community/t/sometime-function-is-not-executing-even-after-call-with-proper-parameter/38 "2020-05-28T13:56:08Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![vivek.sonawane](https://avatars.discourse-cdn.com/v4/letter/v/e95f7d/32.png) [@vivek.sonawane](https://pdfjs.community/u/vivek.sonawane)\
**Post date:** [May 28, 2020, 1:56pm UTC](https://pdfjs.community/t/sometime-function-is-not-executing-even-after-call-with-proper-parameter/38/1 "2020-05-28T13:56:08Z")

</div>

Question : Some times annotations wont deleted even if we called that  
function. We have used "deleteAnnotation(selectedAnnot); " command to  
delete Annotation  
Same thing happens with loading existing annotations (xfdf strings)  
in viewer. We have used “importAnnotCommand(xfdf)” method to load  
annotation  
Note: we have used debugger for our code, everything works fine till  
these 2 commands call . Each annotation xfdf string is properly  
getting into these 2 commands .

some more description :  
Currently annotations won’t be saved inside pdf and it seems like there may be permission issues but it is not like that. Because we are saving XFDF strings separately inside our database. Whenever pdf loads into viewer annotations are imported separately using importAnnotCommand .Also we are not setting up any permission for any user .  
Basically this is happening some times only , if we reload and again call delete function then annotations get deleted. I don’t know why this is happening but in both cases (before reload and after reload screen) function gets executed properly with proper parameters.

---

_[View the full topic](https://pdfjs.community/t/sometime-function-is-not-executing-even-after-call-with-proper-parameter/38)._
