On button click I am looping through record id’s pass that 1 by 1 to webservice which will return XML data where in I will get ID of another record which I will pass to another webservice which will return result success. After finish this I want to show message success
Function defination
const GetRunningWorkflowTasksForCurrentUserForListItemRequest = (
absoluteUrl: string,
itemId: number,
listName: string,
callback
) => {
const soapURL = `${absoluteUrl}/example.asmx?op=GetListItem`
const soapRequest = `SOAP Request`
getWFData(soapURL, soapRequest, callback) // Get XML with call back function parameter where we will process data
}
Second Function Call
const getWFData = (soapURL: string, soapRequest: string, callback) => {
const xmlhttp = new XMLHttpRequest()
xmlhttp.open("POST", soapURL, true)
xmlhttp.onreadystatechange = () => {
if (xmlhttp.readyState === 4) {
if (xmlhttp.status === 200) {
callback(xmlhttp.responseText)
}
}
}
xmlhttp.setRequestHeader("Content-Type", "text/xml")
xmlhttp.send(soapRequest)
}
First Function Call with loop
const approveSelected = (ids: number[]) => {
ids.forEach((val, idx) => {
const absoluteUrl = props.context.pageContext.web.absoluteUrl
// First function
GetRunningWorkflowTasksForCurrentUserForListItemRequest(
absoluteUrl,
val,
"Temp",
GetRunningWorkflowTasksForCurrentUserForListItemResponse //XML Response
)
})
}
Third Function where we got XML response
const GetRunningWorkflowTasksForCurrentUserForListItemResponse = (response: any) => {
const parser = require("fast-xml-parser")
const absoluteUrl = props.context.pageContext.web.absoluteUrl
if (parser.validate(response) === true) {
const jSONObj = parser.parse(response)
const spTaskId =
jSONObj["soap:Envelope"]["soap:Body"].GetRunningWorkflowTasksForCurrentUserForListItemResponse
.GetRunningWorkflowTasksForCurrentUserForListItemResult.UserTask.SharePointTaskId
processFlexiTaskRequest2(
absoluteUrl,
"Approve",
spTaskId,
"Workflow Tasks",
processFlexiTaskResponse2Response, //XML Response function
""
)
}
}
Forth and Final call for inside loop
const processFlexiTaskResponse2Response = (response: any) => {
const parser = require("fast-xml-parser")
if (parser.validate(response) === true) {
const jSONObj = parser.parse(response)
const result =
jSONObj["soap:Envelope"]["soap:Body"].ProcessFlexiTaskResponse2Response.ProcessFlexiTaskResponse2Result
}
}
I am really confuse, How can I make chain with promise and show confirm once loop finish. Please help
bulk order amoxicillin in usa – price of amoxicillin 500 mg buy amoxicillin online
can i buy ivermectin online – ivermectin 0.1 uk how much is ivermectin
lyrica capsule – lyrica 300 mg price canadian pharmacy online cialis
viagra drug – viagra pills discount generic viagra india 100mg
provigil dosage – order modafinil generic modafinil
azithromycin 100mg pills – zithromax 500mg buy zithromax 500mg online
lasix price india – furosemide on line lasix pill
ventolin inhalers – gnrventolin.com ventolin cost australia
cytotec pill canada – cytotec sale singapore where can i get cytotec pills over the counter
sildenafil tablet usa – australia viagra generic viagra australia online
cialis canada paypal – daily cialis prescription
prednisone 0.5 mg – buy prednisone online buy cheap prednisone
accutane price in canada – can you buy accutane over the counter in canada order accutane online usa
amoxicillin without a doctor – cvs amoxicillin price amoxicillin without a doctorвЂs prescription
methylprednisolone 4 medicine – methylprednisolone 16mg tab otc lyrica
buy my essay – term paper help assignment company
where can i buy viagra cheap – Buy viagra brand brand viagra
buy ivermectin 3mg – stromectol australia ivermectin 400 mg brands
Albuterol online – topventoli.com ventolin inhaler
best pharmacy online no prescription doxycycline – doxycycline canadian online pharmacy prednisolone prescription 5mg
buy sildenafil online – sildenafil coupon order sildenafil
canadian online pharmacy tadalafil – tadalafil online reviews tadalafil online pharmacy
accutane nz – buy accutane 10mg online how to get accutane australia
ivermectin 0.1 uk – stromectol usa ivermectin cost
is vardenafil generic – canadian pharmacy ed pills online malaysia
hydroxychloroquine reviews – hydroxychloroquine zinc azithromycin deltasone 10 mg tablets
xenical mg – xenical price australia xenical uk price
cialis or viagra for women – site generic cialis daily canada
deltasone 50 mg – 24 mg prednisone prednisone purchase
897893 651283Usually I try and get my mix of Vitamin E from pills. Although Id really like to through a amazing meal program it can be rather hard to at times. 39075
sildenafil generic purchase – buy pfizer viagra in canada viagra online-australia
canadian pharmacy 24 – cialis price walmart tadalafil 5 mg tablet
cheap cialis prescription – Cialis health store canadianpharmacymeds com
sildenafil generic – Buy viagra lowest price canadian rx viagra
ivermectin pills – stromectol medicine ivermectin 12 mg stromectol
prednisone 1 mg tablet – prednisone 5 mg pills deltasone price in india
cost of 10 mg prednisone – prednisone 20mg pills prednisone for dogs without rx
order plaquenil 400mg online cheap – order plaquenil 200mg pills order valacyclovir 1000mg without prescription
brand sildalis – purchase sildalis generic glucophage 500mg over the counter
oral ampicillin 250mg – buy cipro generic order hydroxychloroquine 400mg sale
sildenafil online order – oral cialis 20mg tadalafil 10mg drug
sildenafil 100mg en france – generique tadalafil 10mg tadalafil 40mg pour homme
buy prednisone 20mg pills – brand prednisone 20mg prednisone 5mg usa
buy isotretinoin without prescription – amlodipine online order amoxil pills
lyrica 150mg sale – buy clomid 50mg azithromycin 500mg price
Maltipoo
accutane 1mg