Skip to main content
Nintex Community Menu Bar
Question

can't mark tasks as complete using the check mark

  • July 9, 2024
  • 8 replies
  • 1 view
  • Translate

Forum|alt.badge.img+1

I am using task tables using pretty much the code found here: Page Not Found — Skuid v15.1.6 Documentation the green check box to mark tasks complete is not working. is there an issue with the code on this sample page?

Did this topic help you find an answer to your question?
This topic has been closed for comments

8 replies

Forum|alt.badge.img+17
  • Nintex Employee
  • 3763 replies
  • July 9, 2024

Well the link in the tutorial to our page repository was old and moldy.  Here is a better link to a sample page that has the task table working correctly. 

https://github.com/skuidify/SamplePages/blob/master/pages/Opportunity%20Detail%20Starter%20Page

Let me know if this still gives you trouble. 


Translate

Forum|alt.badge.img+3

Hi Brandon, I just tested our sample page, and it is working. Try this one and see if it works: skuid.snippet.registerSnippet(‘tasks.markCompleted’,function(params){ // Mark all selected items as closed, // then save our 2 Tasks models var model = params.model, list = params.list, selectedItems = params.item ? [params.item] : list.getSelectedItems(); if (selectedItems.length === 1 && skuid.model.isNewId(selectedItems[0].row.Id)) { alert(‘Please finish creating this Task before marking it as completed.’); return; } $j.each(selectedItems,function(i,item){ model.updateRow(item.row,‘Status’,‘Completed’); }); // Block the list from having updates list.element.block({ css: list.blockUICSS, overlayCSS: list.blockOverlayCSS, message:‘Marking Tasks as Completed…’ }); var saveFinishes = model.save({callback: function(){ var updateFinishes = skuid.model.updateData([model,skuid.model.getModel(‘TaskHistory’)]); $j.when(updateFinishes).then( function(){ list.element.unblock(); }, function(){ list.element.unblock(); } ); } }); });

Translate

Forum|alt.badge.img+1

Hi Joel, I am working with Brandon on this and the code that we are using is exactly the same as you posted. It only works the first time. Could there be a caching issue here? We are using Chrome. Thanks!

Translate

Forum|alt.badge.img+5

Shanna or Brandon, are you guys seeing any javascript errors in the console when you run it the second time?

Translate

Forum|alt.badge.img+1

No. It just doesn’t seem to execute the second time.

Translate

Forum|alt.badge.img+5

Shanna, would you grant Skuid access so I can take a look at this? 

Translate

Forum|alt.badge.img

For me, the code posted on http://help.skuidify.com/m/supercharge-your-ui/l/107247-build-an-activities-related-list-tab works, but in Chrome I it hangs (item is marked complete, but page hands with gray overlay and words: “Marking tasks as completed”
In the console I get the error:

Uncaught TypeError: Converting circular structure to JSON skuid__SkuidJS:4

lskuid__SkuidJS:4
iskuid__SkuidJS:4
model.save.callbackUI?page=OpportunitiesTab:120
a.RemotingStubs.save.escapeskuid__SkuidJS:4
e.cbVFRemote.js:132
VFExt3.direct.RemotingProvider.VFExt3.extend.doCallbackVFRemote.js:99
VFExt3.direct.RemotingProvider.VFExt3.extend.onDataVFRemote.js:94
VFExt3.extend.handleResponseVFRemote.js:75
aVFRemote.js:39
(anonymous function)VFRemote.js:40

Is there anything you would suggest to make the page work?

Translate

Forum|alt.badge.img+10

I had this issue and it was because I hadn’t linked the snippet to the correct model as referenced in the lower part of the snippet code (I was using a model named ‘Tasks’ rather than ‘TaskHistory’). Yours might be hanging for a different reason though…

var saveFinishes = model.save({callback: function(){ var updateFinishes = skuid.model.updateData([model,skuid.model.getModel('<b>Tasks</b>')]); $j.when(updateFinishes).then( function(){ list.element.unblock(); }, function(){ list.element.unblock(); } ); } });<br>
Translate

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings