Saturday, February 19, 2022

Find and Exist Method

 /// <summary>

    ///

    /// </summary>

    public static ConWHSVehicleGroup find(ConWHSVehicleGroupId _groupId,boolean _forupdate = false )

    {

        ConWHSVehicleGroup vehGroup;


        vehGroup.selectForUpdate(false);


select firstonly * from vehGroup

            where vehGroup.WHSVehicleGroupId == _groupId;

        return vehGroup;

    }


    /// <summary>

    ///

    /// </summary>

    public static boolean exist(ConWHSVehicleGroupId _groupId)

    {

        ConWHSVehicleGroup vehGroup; 


if(_groupId)

        {

            select firstonly RecId from vehGroup

where vehGroup.WHSVehicleGroupId == _groupId;  

        }

       

        return (vehGroup.RecId !=0);

    }

No comments:

Post a Comment

Sample Dialog Syntax - 1

 class AffiliationAutoAssignment extends RunBaseBatch {     // 1. Class Declaration and Pack variables     #define.CurrentVersion(1)     #de...