Forum Replies Created
-
AuthorPosts
-
Alex i’m facing weird behavior from calendar field, when i click on the calendar icon it jump to the top of the page any idea?
.ms-notif-box{
display: none !important;
}`to hide the message “Workflow terminated”
spjs.workflow = { "text":{ "successMessage":"The workflow was terminated", "errorMessage":"Something went wrong. To try again, reload the page." }, "data":{ "dlg":null }, "initListItemWF":function(subscriptionId){ if(typeof SP.WorkflowServices === "undefined"){ jQuery.getScript(_spPageContextInfo.webServerRelativeUrl+"/_layouts/15/sp.workflowservices.js",function(){ spjs.workflow.terminate(subscriptionId); }); }else{ spjs.workflow.terminate(subscriptionId); } }, "terminate":function(subscriptionId){ var listId = ""; var itemId = GetUrlKeyValue("ID"); console.log(subscriptionId); //spjs.workflow.showProgress(); var ctx = SP.ClientContext.get_current(); var wfManager = SP.WorkflowServices.WorkflowServicesManager.newObject(ctx, ctx.get_web()); var workflowInstanceService = wfManager.getWorkflowInstanceService(); var wfInstances = workflowInstanceService.enumerateInstancesForListItem(listId, itemId); ctx.load(wfInstances); ctx.executeQueryAsync( function(sender, args){ var instancesEnum = wfInstances.getEnumerator(); while(instancesEnum.moveNext()){ var instance = instancesEnum.get_current(); console.log(instance.get_workflowSubscriptionId().toString().toUpperCase()); if(instance.get_workflowSubscriptionId().toString() == subscriptionId){ console.log("Matched"); workflowInstanceService.terminateWorkflow(instance); ctx.executeQueryAsync( function(sender, args) { spjs.workflow.closeDlg(); SP.UI.Notify.addNotification(spjs.workflow.text.successMessage,false); }, function (sender, args) { spjs.workflow.closeDlg(); console.log(spjs.workflow.text.errorMessage); //alert(spjs.workflow.text.errorMessage); } ); } } console.log("terminated"); }, function(sender, args) { spjs.workflow.closeDlg(); console.log(errorMessage); //alert(errorMessage); } ); }, "closeDlg":function(){ if(spjs.workflow.data.dlg != null){ spjs.workflow.data.dlg.close(); } }, "showProgress":function(){ if(spjs.workflow.data.dlg == null){ spjs.workflow.data.dlg = SP.UI.ModalDialog.showWaitScreenWithNoClose("Please wait...", "Waiting for workflow...", null, null); } } };
Alex if i want to call a function from a rule and set some parameters for it i can’t do that?
i’ve added a screenshot check it.
Attachments:
okay thanks Alex, i tried this solution and it’s not working 100% but after doing some research and checking your solution to start a workflow using a button i fixed the code and it’s working fine with me now, if you want i can share the code here.
okay great everything is working fine now i copied also the spjs_path and i will update my print function in DFFS_fronted_min.js file now.
thank you.
it worked but i lost part of my configuration print header and footer.
it didn’t work on explorer and chrome — error: spjs_path is undefined.
DFFS version: 4.4.3.58 — 4.46 —- 1.328i tried both options to insert picture from SharePoint/Computer and still is not working.
which snippet should i add to my custom js, you didn’t send it.Okay, but same Dffs version is used online and on-premise, the JS fucntion is working online and not on-premise any idea why?
what i’m trying is to hide “Approved” option from 2nd level approval when final approval is rejected, it’s working online this function but on premise i’m facing some issues.check screenshots.
Attachments:
Hi alex, i changed my JS function to hide only the field it worked but field label is still appearing but the drop-down choices disappeared. what do you think? what’s the problem here with this version (same version is working online)
Sorry online it’s working on-premise it’s not
delay didn’t work for me , i will check how i can fix it and will get back to you.
-
AuthorPosts