USP_DATAFORMTEMPLATE_ADD_SALESORDERITEMMEMBERSHIPRENEWAL

The save procedure used by the add dataform template "Sales Order Item Membership Renewal 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.
@MEMBERSHIPID uniqueidentifier IN Input parameter indicating the context ID for the record being added.
@SALESORDERID uniqueidentifier IN
@MEMBERSHIPLEVELID uniqueidentifier IN Level
@MEMBERSHIPLEVELTERMID uniqueidentifier IN Term
@MEMBERSHIPTYPECODEID uniqueidentifier IN Type
@NUMBEROFCHILDREN smallint IN No. of children
@COMMENTS nvarchar(1000) IN Comments
@ISGIFT bit IN This membership is a gift
@SENDRENEWALCODE smallint IN Send renewal notice to
@MEMBERS xml IN Members
@GIVENBYID uniqueidentifier IN Given By

Definition

Copy


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

                        begin try
                            exec dbo.USP_SALESORDERITEMMEMBERSHIP_ADD
                                        @ID,
                                        @CHANGEAGENTID,
                                        @SALESORDERID,
                                        @MEMBERSHIPID,
                                        null,
                                        @MEMBERSHIPLEVELID,
                                        @MEMBERSHIPLEVELTERMID,
                                        @MEMBERSHIPTYPECODEID,
                                        @NUMBEROFCHILDREN,
                                        @COMMENTS,
                                        @ISGIFT,
                                        @SENDRENEWALCODE,
                                        @MEMBERS,
                                        @GIVENBYID,
                                        0;
                        end try

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

                        return 0;