Користувальницькі налаштування

Налаштування сайту


applet:drilldown_object

DrillDown Object на Form Applet

Первоисточник bookshelf

DrillDown Object предоставляет пользователю возможность создать на поле List Applet Hyperlink при нажатии на который произойдет переход на другой View.
Важной оговоркой является что You can configure Drilldown objects for list applets only.
Но не стоит унывать, ниже я опишу как реализовать Driildown Object на Form Applet.

Properties

PropertyDescription/Usage
Business ComponentНазвание BC1) в который будет проваливаться пользователь
Destination FieldНазвание Field в Destination BC 2) значение которого должно быть равно значению в Source BC 3). Если не указано никакого значение значит указано значение Id.
Hyperlink FieldFiled в BC 4) на котором появится Drilldown.
Menu TextНе используется
NameНазвание Drilldown objects.
SequenceЧисловое значение определяющее последовательность сортировки
Source FieldНазвание поля, значение которого используется как Search Specification Destination Field.
Если вы не указываете business component Property не указывайте Source Field
ViewView которое отобразиться после того как пользователь перейдет по Hyperlink
Visibility TypeA property that, when row ID-based drilldown is employed from an applet to a specific destination record, specifies a different visibility type (All, Sales Rep, Manager, or Personal) than the default visibility for the destination business component.

Создание Drilldown Object

Прежде чем создать Drilldown Object на Form Applet необходимо добавить следующие Control:

NameFieldCaption - String OverrideHTML TypeMethod Invoked
Campaign NameCampaign NameМаркетинговое предложениеText
Campaign Name2Campaign NameМаркетинговое предложениеLinkDrilldown

Создаем Drilldown Object:

NameHiperlink FieldView
Campaign NameCampaign NameCall Center View

Добавляем Control на Web Template и все компилируем.
При нажатии на Hyperlink “Маркетинговое предложение” мы перейдем на вид Call Center View.

Создание нескольких Drilldown Object

Для создания двух Drilldown object добавляем следующие Control:

NameFieldCaption - String OverrideHTML TypeMethod Invoked
Campaign NameCampaign NameМаркетинговое предложениеText
Campaign Name2Campaign NameМаркетинговое предложениеLinkDrilldown
BCC Quote NameBCC Quote NameКоммерческое предложениеText
BCC Quote Name2BCC Quote NameКоммерческое предложениеLinkDrilldown

Без обработки Server Script

Далее создаем необходимые нам Drilldown Object на соответствующие Field:

NameHiperlink FieldView
Campaign NameCampaign NameCall Center View
BCC Quote NameBCC Quote NameLast Call Center View

При необходимости надо указать дополнительные Property

При необходимости обработки Server Script

Browser Script

function Applet_PreInvokeMethod (name, inputPropSet)
{
	if(name=="Drilldown")
	   {    
	        var SWEFieldParts = inputPropSet.GetProperty("SWEField").split("_");
	        theApplication().SetProfileAttr("BCC_Drilldown_Field",SWEFieldParts[3]);
		//alert(theApplication().GetProfileAttr("BCC_Drilldown_Field"));
	    } 
 
	return ("ContinueOperation");
}

Manifest File

На примере AL Service Request List Applet With Navigation

//Regenerate using:https://duncanford.github.io/prpm-code-generator/?prpm=PM&object=DesktopList&name=ALServiceRequestListAppletWithNavigation&userprops=&comments=Yes&logging=No
if (typeof(SiebelAppFacade.ALServiceRequestListAppletWithNavigationPM) === "undefined") {
 
 SiebelJS.Namespace("SiebelAppFacade.ALServiceRequestListAppletWithNavigationPM");
 define("siebel/custom/ALServiceRequestListAppletWithNavigationPM", ["siebel/listpmodel"],
  function () {
   SiebelAppFacade.ALServiceRequestListAppletWithNavigationPM = (function () {
 
    function ALServiceRequestListAppletWithNavigationPM(pm) {
     SiebelAppFacade.ALServiceRequestListAppletWithNavigationPM.superclass.constructor.apply(this, arguments);
    }
 
    SiebelJS.Extend(ALServiceRequestListAppletWithNavigationPM, SiebelAppFacade.ListPresentationModel);
 
    ALServiceRequestListAppletWithNavigationPM.prototype.Init = function () {
     // Init is called each time the object is initialised.
     // Add code here that should happen before default processing
     SiebelAppFacade.ALServiceRequestListAppletWithNavigationPM.superclass.Init.apply(this, arguments);
     // Add code here that should happen after default processing
	 this.AddMethod("InvokeMethod", PreInvokeMethod, {sequence: true, scope: this});
    }
 
    ALServiceRequestListAppletWithNavigationPM.prototype.Setup = function (propSet) {
     // Setup is called each time the object is initialised.
     // Add code here that should happen before default processing
     SiebelAppFacade.ALServiceRequestListAppletWithNavigationPM.superclass.Setup.apply(this, arguments);
     // Add code here that should happen after default processing
    }
 
    function PreInvokeMethod(methodName, psInp, lp, returnStructure) {
		//console.log("methodName=" + methodName);
		//console.log("psInp=" + psInp);
		//console.log("SWEField=" + psInp.GetProperty("SWEField"));
 
		if(methodName=="Drill"+"down"){    
			var SWEFieldParts = psInp.GetProperty("SWEField").split("_");
			theApplication().SetProfileAttr("BCC_Drilldown_Field",SWEFieldParts[3]);
 
			SiebelApp.S_App.uiStatus.Free();
			returnStructure["ContinueOperation"] = true; 
		}
	}
    return ALServiceRequestListAppletWithNavigationPM;
   }()
  );
  return "SiebelAppFacade.ALServiceRequestListAppletWithNavigationPM";
 })
}

1. Скопировать файл 'ALServiceRequestListAppletWithNavigationPM.js' в папку 'applicationcontainer_external/siebelwebroot/scripts/siebel/custom' 2. Администрирование - Приложения → Manifest Files - добавить новую запись

  1. Inactive Flag = false
  2. Наименование 'siebel/custom/ALServiceRequestListAppletWithNavigationPM.js'

3. Администрирование - Приложения → Manifest Administration - добавить новую запись

  1. Inactive Flag = false
  2. Type = Applet
  3. Usage Type = Presentation Model
  4. Наименование = 'AL Service Request List Applet With Navigation'

4. Администрирование - Приложения → Object Expression

  1. Inactive Flag = false
  2. Level = 1

4. Администрирование - Приложения → Files

  1. Inactive Flag = false
  2. Последовательность = 1
  3. Наименование = 'siebel/custom/ALServiceRequestListAppletWithNavigationPM.js'

Создаем необходимые нам Drilldown Object на соответствующие Field:

NameHiperlink FieldView
Campaign NameCampaign Name
BCC Quote NameBCC Quote Name

Property View оставляем пустым

Создаем Server script в котором используем GotoView Method

if (MethodName=="Drilldown")
	{
		switch (TheApplication().GetProfileAttr("Drilldown_Field"))
		{
		case "24": TheApplication().GotoView("Call Center View");
		   break;
		case "25": TheApplication().GotoView("Last Call Center View");
		   break;
		default:
		   return (ContinueOperation);
		   break;
		}	return (CancelOperation);	
	}

wiki_admin 2014/12/02 09:05 Drilldown

1) , 2) , 3) , 4)
Business Component
applet/drilldown_object.txt · Востаннє змінено: 2022/12/05 17:17 повз wiki_admin