on 02-23-2024 8:23 PM
I have partial success! If I hard-code the period in the http request body in the custom script, it works. What I need to be able to do is to reference the period in the Input parameter and set it inside the script. Here is the script as I have it now.
I'm not sure if I'm trying to do something that can't be done or if there is a work-around to get the HTTP Request syntax correct.
Thanks!
Ron
I think I figured out how to do it (but I do have one question). Here is what I now have in the custom scripts:
-----------------------------------------------------------------------------
let pName = PeriodName;
let options1 = "'method': 'POST', 'headers': {'Content-type': 'application/json', 'accept': 'application/json'}, 'body': JSON.stringify({Command: 'PipelineRun', StageType: 'CompensateAndPay', TraceLevel: 'status', ProcessingUnit: 'Unassigned', UserId: 'Administrator', RunMode: 'full', Period: {Name: '" + pName + "'}, CalendarName: 'Main Monthly Calendar'}), 'responseType':'json', 'resolveBodyOnly':true ";
let options = "{" + options1 + "}";
return options;
--------------------------------------------------------------------------------
This does work but I would like to have it formatted so that it's easier to read. Unfortunately, if I try to format it by putting in carriage returns, it fails. Is there another way to do this? It's functional, which is great and if there isn't a way then I'm good with that.
Thanks!
Ron
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.