Bookshelf Home | Contents | Index | PDF |
Siebel Object Interfaces Reference > Interfaces Reference > Application Methods > SetProfileAttr MethodSetProfileAttr is used in personalization to assign values to attributes in a user profile. SyntaxApplication.SetProfileAttr(name, value) ReturnsUsageSetProfileAttr assigns the value value to the attribute in a user profile indicated by name. If the profile attribute specified in the argument string already exists, the corresponding persistent profile attribute in the application, defined in the Personalization Profile business component, is updated with the new value. If the profile attribute specified in the argument string does not exist in the list of persistent profile attributes, it is created as a dynamic profile attribute, without quotation marks encompassing the name. In Browser Script, using SetProfileAttr() triggers a round trip to the server and back, creating a performance overhead each time it is used. NOTE: SetProfileAttr() cannot be used with system fields, which are not explicitly defined in the Personalization Profile business component. While GetProfileAttr() can be used with the Id field, SetProfileAttr() cannot be used with it, because attempting to change the ROW_ID column of a table will generate an error. For more information on system fields, see Configuring Siebel Business Applications. Used WithBrowser Script, COM Data Control, COM Data Server, Server Script, Java Data Bean, Mobile Web Client Automation Server ExampleThe following example is in Browser Script: function Applet_PreInvokeMethod (name, inputPropSet) { This following examples show how to exchange information between applet server scripts and applet browser scripts. In an applet server script, a customer profile attribute called MyProAttr is set to "Hello World" using the SetProfileAttr method. In applet browser scripts, you can retrieve the profile attribute using GetProfileAttr method. The following example is in Siebel eScript: function WebApplet_PreInvokeMethod (MethodName) if (MethodName == "MyCustomMethod") { TheApplication().SetProfileAttr("MyProAttr", "Hello World eScript"); The following example is in Siebel VB: Function WebApplet_PreInvokeMethod (MethodName As String) As Integer If MethodName = "MyCustomMethod" Then TheApplication.SetProfileAttr "MyProAttr", "Hello World VB" Related TopicsFor more information on user profile attributes, read Siebel Applications Administration Guide. |
Siebel Object Interfaces Reference | Copyright © 2008, Oracle. All rights reserved. | |