Stored Procedures [dbo].[MssWebCheckOrderLocationCanBeDeleted]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@inLocationIdint4
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
create procedure [dbo].[MssWebCheckOrderLocationCanBeDeleted]
    @inLocationId int
as
begin
    set nocount on;
    declare @allowDelete bit = 1;
    exec CanDeleteOrderLocation @inLocationId, @allowDelete output
    if(@allowDelete = 1)
    begin
        set @allowDelete = isnull((select top 1 convert(bit,0)
            from OrderLocationBuildingConstraint where OrderLocationFID = @inLocationId),1);
    end

    select @allowDelete
end
GO
GRANT EXECUTE ON  [dbo].[MssWebCheckOrderLocationCanBeDeleted] TO [MssExec]
GO
Uses