UFN_RECORDOPERATION_PAGEREFERENCES

Returns a table of page IDs that reference the given record operation.

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@RECORDOPERATIONID uniqueidentifier IN

Definition

Copy


CREATE function dbo.UFN_RECORDOPERATION_PAGEREFERENCES
(
    @RECORDOPERATIONID uniqueidentifier
)
returns @TABLE table
(
    PAGEID uniqueidentifier
)
with execute as caller
as
begin

    -- find pages that use this record operation 

    with xmlnamespaces ('bb_appfx_pagedefinition' as tns, 'bb_appfx_commontypes' as common)
    insert into @TABLE
        select distinct P.ID
        from dbo.PAGEDEFINITIONCATALOG as P
            cross apply P.PAGEDEFINITIONSPEC.nodes('//common:ExecuteRecordOperation') as page(recordoperationactions)
        where page.recordoperationactions.value('@RecordOperationID', 'uniqueidentifier') = @RECORDOPERATIONID;

    return;

end;