USP_DATAFORMTEMPLATE_ADD_SALESORDERITEMMEMBERSHIPGIFT

The save procedure used by the add dataform template "Sales Order Item Membership Gift Add Data Form".

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier INOUT The output parameter indicating the ID of the record added.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the procedure.
@SALESORDERID uniqueidentifier IN Input parameter indicating the context ID for the record being added.
@MEMBERSHIPID uniqueidentifier IN Membership
@MEMBERSHIPPROGRAMID uniqueidentifier IN Program
@MEMBERSHIPLEVELID uniqueidentifier IN Level
@MEMBERSHIPLEVELTERMID uniqueidentifier IN Term
@MEMBERSHIPLEVELTYPECODEID uniqueidentifier IN Type
@NUMBEROFCHILDREN smallint IN No. of children
@COMMENTS nvarchar(1000) IN Comments
@ISGIFT bit IN This membership is a gift
@SENDRENEWALCODE tinyint IN Send renewal notice to
@EXPIRATIONDATE datetime IN Expiration date
@MEMBERS xml IN Members
@GIVENBYID uniqueidentifier IN Given by

Definition

Copy


                    CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_SALESORDERITEMMEMBERSHIPGIFT
                    (
                        @ID uniqueidentifier = null output,
                        @CHANGEAGENTID uniqueidentifier = null,
                        @SALESORDERID uniqueidentifier,
                        @MEMBERSHIPID uniqueidentifier = null,
                        @MEMBERSHIPPROGRAMID uniqueidentifier = null,
                        @MEMBERSHIPLEVELID uniqueidentifier = null,
                        @MEMBERSHIPLEVELTERMID uniqueidentifier = null,
                        @MEMBERSHIPLEVELTYPECODEID uniqueidentifier = null,
                        @NUMBEROFCHILDREN smallint = 0,
                        @COMMENTS nvarchar(1000) = null,
                        @ISGIFT bit = 0,
                        @SENDRENEWALCODE tinyint = 1,
                        @EXPIRATIONDATE datetime = null,
                        @MEMBERS xml = null,
                        @GIVENBYID uniqueidentifier = null
                    )
                    as
                        set nocount on;

                        begin try
                            exec dbo.USP_SALESORDERITEMMEMBERSHIP_ADD
                                        @ID output,
                                        @CHANGEAGENTID,
                                        @SALESORDERID,
                                        @MEMBERSHIPID,
                                        @MEMBERSHIPPROGRAMID,
                                        @MEMBERSHIPLEVELID,
                                        @MEMBERSHIPLEVELTERMID,
                                        @MEMBERSHIPLEVELTYPECODEID,
                                        @NUMBEROFCHILDREN,
                                        @COMMENTS,
                                        @ISGIFT,
                                        @SENDRENEWALCODE,
                                        @EXPIRATIONDATE,
                                        @MEMBERS,
                                        @GIVENBYID,
                                        0;
                        end try

                        begin catch
                            exec dbo.USP_RAISE_ERROR;
                            return 1;
                        end catch

                        return 0;