We use the following code in our validation script:
Dim str As String = Convert.ToString(Value)
If Not String.IsNullOrEmpty(str) Then
Dim mvp As New MultiValueProperty(str)
For Each prop In mvp
Dim profitCenter As IEntity = Session.Source.Get("ProfitCenter", prop, EntityLoadType.ReadOnly)
Dim costObjectType As String = profitCenter.GetValue("CCC_CostObjectType").String
If String.Equals(costObjectType, "Cost Node", StringComparison.OrdinalIgnoreCase) Then
Throw New ViException(#LD("You cannot select cost nodes (e.g. {0})", profitCenter.Display)#, ExceptionRelevance.EndUser)
End If
Next
End If
The exception only shows in the javascript console output, but no frontend messagebox is shown.
Product Defect
Raise a trouble ticket with the Support Team and ask for Hotfix #542744.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center