IsMethodAvailable

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

SalBoolean IsMethodAvailable( SalString sMethod )

The IsMethodAvailable method tells if a LU method is available (granted) to the user.

Parameters

Name Description
SalString sMethod Qualified (package name + method name) name of the method. This parameter is not case sensitive.

Returns

The return value is TRUE if the method is available, FALSE otherwise.

Comments

A method is available if the package is available and there is no restriction on the method.

Example

Function: GenerateStatistics
   Actions
       Select Case nWhat
          Case METHOD_Inquire
              Return Security.IsMethodAvailable( 'Some_API.Generate_Statistics' )
          Case METHOD_Execute
              Return DbPLSQLTransaction( c_hSql, 'Some_API.Generate_Statistics( sId )' )
C# code
public new SalNumber UserMethod(SalNumber nWhat, SalString sMethod)
{
	#region Actions
	using (new SalContext(this))
	{
		switch (nWhat)
		{
				
			case Const.METHOD_Inquire:
				return Var.Security.IsMethodAvailable("Some_API.Generate_Statistics");
			
			case Const.METHOD_Execute:
				................