/
How to Pass Header Input Values to Inline Configurator
How to Pass Header Input Values to Inline Configurator
If you need to pass Quote, Agreement/Promotion or Rebate Agreement header field values to the inline configurator logic, you can use the api.contextTypedId()
method. This way, you can obtain the TypedId and further work with it (e.g., fetch a Quote).
Agreement/Promotion Header Logic
if (api.isInputGenerationExecution())
return
def configuratorValue = cProcessor.getHelper().getRoot().getInputByName("configurator")?.value
cProcessor.addOrUpdateInput("ROOT",
["name" : "configurator",
"label" : "Configuration",
"type" : "INLINECONFIGURATOR",
"typedId" : api.contextTypedId(),
"url" : "PromotionManagerConfigurator",
"value" : configuratorValue]
)
Agreement/Promotion Configurator Logic
def typedId = api.input("typedId")
def contract = api.find("CT", Filter.equal("id", typedId?.split('\\.')[0]))[0]
//Description
def descriptionParam = ce.createParameter(InputType.STRINGUSERENTRY,"Description")
descriptionParam.setLabel("Description")
descriptionParam.setReadOnly(true)
descriptionParam.setValue(contract.get("label"))
descriptionParam.setParameterGroup("General")
//Start Date
def startDateParam = ce.createParameter(InputType.DATEUSERENTRY,"StartDate")
startDateParam.setLabel("Start Date")
startDateParam.setReadOnly(true)
startDateParam.setParameterGroup("General")
def startDate = api.input("StartDate")
if(!startDate)
startDate = contract.get("startDate")
startDateParam.setValue(startDate)
//Upload Customers
def uploadCustomersParam = ce.createParameter(InputType.PARSABLEINPUTFILE,"UploadCustomers")
uploadCustomersParam.setTypedId(contract.typedId)
uploadCustomersParam.setLabel("Upload Customer(s)")
uploadCustomersParam.setParameterGroup("Upload Customer(s)")
def uploadCustomers = api.input("UploadCustomers")
uploadCustomersParam.setValue(uploadCustomers)
, multiple selections available,
Related content
Pass Values between Quote Header Logic, Configurator and Line Item Logic
Pass Values between Quote Header Logic, Configurator and Line Item Logic
More like this
Interactive Forms - Configurators
Interactive Forms - Configurators
More like this
How to Handle Passing Values within Quote's Header Logics, Configurators and Line Item Logic
How to Handle Passing Values within Quote's Header Logics, Configurators and Line Item Logic
Read with this
How to pass Header Input Values into Line Item Configurator
How to pass Header Input Values into Line Item Configurator
More like this
How to Pass Data from Header Logic to Line Item Logic
How to Pass Data from Header Logic to Line Item Logic
Read with this
Configurator Builder Utils
Configurator Builder Utils
More like this
Found an issue in documentation? Write to us.