Skip to main content
deleted 13 characters in body
Source Link
Nadeem Yousuf-AIS
  • 18.7k
  • 4
  • 29
  • 59
  • Versioning of the list should be enabled.
  • Current user should have deleteListItems permissions at web level.
  • Versioning of the list should be enabled.
  • Current user should have deleteListItems permissions at web level.
  • Versioning of the list should be enabled.
  • Current user should have deleteListItems permissions.
Notice removed Draw attention by CommunityBot
Bounty Ended with no winning answer by CommunityBot
Tweeted twitter.com/#!/StackSharePoint/status/416337407349628928
Provided more information
Source Link
Nadeem Yousuf-AIS
  • 18.7k
  • 4
  • 29
  • 59

UPDATE

I also tried several other options like moving the code which checks UserPermissions to OnSuccess method, Using Promises with the JavaScript Client Object Model etc. Here is a pictorial representation of what happens when I execute the code. The ECB menu is already generated by the time the code in OnSuccess method is executed.enter image description here

enter image description here

UPDATE

I also tried several other options like moving the code which checks UserPermissions to OnSuccess method, Using Promises with the JavaScript Client Object Model etc. Here is a pictorial representation of what happens when I execute the code. The ECB menu is already generated by the time the code in OnSuccess method is executed.enter image description here

enter image description here

Notice added Draw attention by Nadeem Yousuf-AIS
Bounty Started worth 50 reputation by Nadeem Yousuf-AIS
Improved the question
Source Link
Nadeem Yousuf-AIS
  • 18.7k
  • 4
  • 29
  • 59

Now when I log in with a user having deleteListItems permissions and browse to a list in which versioning is enabled and click ECB of any item, the first time it doesn't show the new ECB item (Export Version History) . It does show on subsequesnt ECB clicks. The problem arises because of the asynchronous behavior of the JSOM since hasPermissions field will be false for the first time. In ribbon we have RefreshCommandUI() to take ofavert this issue. How can I fix this issue in ECB?

Now when I log in with a user having deleteListItems permissions and browse to a list in which versioning is enabled and click ECB of any item, the first time it doesn't show the new ECB item (Export Version History) . It does show on subsequesnt ECB clicks. The problem arises because of the asynchronous behavior of the JSOM since hasPermissions field will be false for the first time. In ribbon we have RefreshCommandUI() to take of this issue. How can I fix this issue in ECB?

Now when I log in with a user having deleteListItems permissions and browse to a list in which versioning is enabled and click ECB of any item, the first time it doesn't show the new ECB item (Export Version History) . It does show on subsequesnt ECB clicks. The problem arises because of the asynchronous behavior of the JSOM since hasPermissions field will be false for the first time. In ribbon we have RefreshCommandUI() to avert this issue. How can I fix this issue in ECB?

Source Link
Nadeem Yousuf-AIS
  • 18.7k
  • 4
  • 29
  • 59
Loading