HYM

Forum Replies Created

Viewing 15 posts - 46 through 60 (of 73 total)
  • Author
    Posts
  • in reply to: Workflow Termination #24934
    HYM
    Participant

    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?

    in reply to: Workflow Termination #24932
    HYM
    Participant

    .ms-notif-box{
    display: none !important;
    }`

    to hide the message “Workflow terminated”

    in reply to: Workflow Termination #24930
    HYM
    Participant
    
    
    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);
    		}
    	}
    };
    in reply to: Workflow Termination #24923
    HYM
    Participant

    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:
    in reply to: Workflow Termination #24913
    HYM
    Participant

    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.

    in reply to: Print image in a tab #23450
    HYM
    Participant

    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.

    in reply to: Print image in a tab #23444
    HYM
    Participant

    it worked but i lost part of my configuration print header and footer.

    in reply to: Print image in a tab #23440
    HYM
    Participant

    it didn’t work on explorer and chrome — error: spjs_path is undefined.
    DFFS version: 4.4.3.58 — 4.46 —- 1.328

    in reply to: Print image in a tab #23435
    HYM
    Participant

    i 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.

    in reply to: DFFS Issue #22481
    HYM
    Participant

    Okay, but same Dffs version is used online and on-premise, the JS fucntion is working online and not on-premise any idea why?

    in reply to: DFFS Issue #22437
    HYM
    Participant

    screenshot 4

    • This reply was modified 5 years, 6 months ago by HYM.
    Attachments:
    in reply to: DFFS Issue #22432
    HYM
    Participant

    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.

    in reply to: DFFS Issue #22422
    HYM
    Participant

    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)

    in reply to: DFFS Issue #22384
    HYM
    Participant

    Sorry online it’s working on-premise it’s not

    in reply to: Rule Trigger on People Picker field #21452
    HYM
    Participant

    delay didn’t work for me , i will check how i can fix it and will get back to you.

Viewing 15 posts - 46 through 60 (of 73 total)