New Comment System@Siebel Unleashed.. Do Try and give me feedback | Next Tip »Home

Product Configurator – SetUIOption API

OkAvarageGoodVery GoodExcellent (1 votes, average: 3.00 out of 5)
Loading ... Loading ...

This is in continuation with my earlier post about SetUIOption API which can be used to present the dynamic UI in Product Configurator.

In this post I am going to give examples explaining the syntax and the usability of this service.

SetUIOption is a method of a vanilla business service called “Cfg Web UI Service Loader” which is responsible for rendering the UI of Product Configurator. This service can be invoked just like any other business service.

General syntax of invoking the service is as following.

var  inp = TheApplication().NewPropertySet();
var out = TheApplication().NewPropertySet();
var svc = TheApplication().GetService(“Cfg Web UI Service Loader”);
inp.SetProperty(“1-77709”,”UI Name”);
Svc.InvokeMethod(“SetUIOption”,inp,out);

One Important thing  to note here is.

inp.SetProperty(“1-77709”,”UI Name”);

This is what makes the Dynamic UI Work. We need pass an input argument to SetUIOption Method telling it which UI should be displayed. The Syntax of the input argument is

  • Row Id of the Product you have created
  • Name of the UI you have given

To explain this better, these are steps I am going to follow to display the dynamic UI.

  • Create 2 UI in Product Configurator.
  1. Simple UI
  2. Complex UI.
  • Note down the Row Id of the Product.
  • Edit the Configurator Load workflow to include call a Business Service as First Step.
  • Put my logic in business service and call Cfg Web UI Service Loader with appropriate input arguments. Which in this example will be as following

if( val == 1 )
{
   var  inp = TheApplication().NewPropertySet();
var out = TheApplication().NewPropertySet();
var svc = TheApplication().GetService(“Cfg Web UI Service Loader”);
inp.SetProperty(“1-77709”,”Simple UI”);
Svc.InvokeMethod(“SetUIOption”,inp,out);
}
else
{
   var  inp = TheApplication().NewPropertySet();
var out = TheApplication().NewPropertySet();
var svc = TheApplication().GetService(“Cfg Web UI Service Loader”);
inp.SetProperty(“1-77709”,”Complex UI”);
Svc.InvokeMethod(“SetUIOption”,inp,out);
}

Hope this will clear up things.

  • Share/Bookmark

Related Posts


Article by neel

Authors bio is coming up shortly. neel tagged this post with: Read 387 articles by neel
  • Hi Neel,

    can we use this in configurator initialize event?
  • abhinav
    Hi Neel,

    Thanks for your this post, it helped me a lot in implementation.
    Now i have a requirment, that in the nested customizable product as well i have to set one UI.
    Can you please guide me how can i achive that, through eConfigurator script or some way.
    What i tried is to create the UI in Nested product with the same name as that in main product but that too is not helping.And other way could be to setUI Option again before invoking the nested product,but i was not able to achive it, as i am not familiar with the events inside configurator and also how to write script inside.
    And also if you can guide me to some technote on Script inside econfigurtor.
blog comments powered by Disqus

Polls

Do you like the new Comment System and new look to Site?

View Results

Loading ... Loading ...