PositionName Method for an Application
The PositionName method returns the name of the current user position. Siebel CRM sets this value by default when it starts the Siebel application.
Format
Application.PositionName
No arguments are available.
Used With
COM Data Control, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script
Examples
The following Siebel VB example determines the position of a user who is attempting to modify the sales stage. If the position does not allow this modification, then this code prevents the modification:
Function BusComp_PreSetFieldValue (FieldName As String, FieldValue As String) As
Integer
Dim sPosName As String sMsgText As String
Select Case FieldName
Case "Sales Stage"
If FieldValue = "Approved" Then
' Do not allow the sales cycle to be modified to
' this value if the User is not a manager or VP.
sPosName = TheApplication.PositionName
If NOT ((sPosName="Manager") OR (sPosName="VP"))Then
TheApplication.RaiseErrorText("Only a Manager or Vice President can
approve a Pipeline Item. Please notify your Manager that you _
want to have this Pipeline Item approved.")
End If
BusComp_PreSetFieldValue = ContinueOperation
End Select
End Function