on 2023 Jul 26 10:17 AM
Dear SAP Community,
I try to define a simple redirect in a SAP CPQ IronPython Script with ApiResponseFactory.RedirectResponse the following way to assign it to a button afterwards.
url = "https://www.example.com/"<br>ApiResponse = ApiResponseFactory.RedirectResponse (url)<br>
But it gives me the statement back: "name 'ApiResponseFactory' is not defined" in the environment of the Workbench and when I have implemented in context of an quote.
What do I miss here?
Look forward to your recommendations. 🙂
Its maybe a little bit offensive but do you guys have maybe an idea how to create a redirect to another web application via a button on the quote and linked custom action which carries the respective logic? 🙂
lukapilipovic patrick.latour3 tdhirendra3221 milovan.srejic michael.wilhelm yoganandamuthaiah
Request clarification before answering.
Hi all,
there are two options to solve it. After hard coding it via an JavaScript into the FrontEnd I found a better way:
I added to the Custom Action script of the respective button the following code.
QuoteId = context.Quote.Id
parameter = QuoteHelper.Get(QuoteId).GetCustomField('QuoteParameter').Value
url= 'https://www.example.com/'+ parameter.ToString()
context.WorkflowContext.RedirectToURL = (url)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
4 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.