USP_DATAFORMTEMPLATE_EDIT_ORGANIZATION_2
The save procedure used by the edit dataform template "Organization Data Edit Form 2".
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | The input ID parameter indicating the ID of the record being edited. |
@CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the procedure. |
@ORGANIZATIONNAME | nvarchar(100) | IN | Name |
@INDUSTRYCODEID | uniqueidentifier | IN | Industry |
@NUMEMPLOYEES | int | IN | No. of employees |
@NUMSUBSIDIARIES | int | IN | No. of subsidiaries |
@PARENTCORPID | uniqueidentifier | IN | Parent org |
@PICTURE | varbinary | IN | Image |
@PICTURETHUMBNAIL | varbinary | IN | Image thumbnail |
@PICTURECHANGED | bit | IN | Picture changed? |
@WEBADDRESS | UDT_WEBADDRESS | IN | Website |
@ISPRIMARY | bit | IN | This is a primary organization |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDIT_ORGANIZATION_2
(
@ID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier = null,
@ORGANIZATIONNAME nvarchar(100),
@INDUSTRYCODEID uniqueidentifier,
@NUMEMPLOYEES int,
@NUMSUBSIDIARIES int,
@PARENTCORPID uniqueidentifier,
@PICTURE varbinary(max),
@PICTURETHUMBNAIL varbinary(max),
@PICTURECHANGED bit,
@WEBADDRESS dbo.UDT_WEBADDRESS,
@ISPRIMARY bit
) as
set nocount on;
begin try
-- moved original code in the USP bellow, which is shared with other areas other then organization edit (duplicate search resolution screen)
exec dbo.USP_ORGANIZATION_EDITSAVE @ID, @CHANGEAGENTID, @ORGANIZATIONNAME, @INDUSTRYCODEID, @NUMEMPLOYEES, @NUMSUBSIDIARIES, @PARENTCORPID,
@PICTURE, @PICTURETHUMBNAIL, @PICTURECHANGED, @WEBADDRESS, @ISPRIMARY;
end try
begin catch
exec dbo.USP_RAISE_ERROR;
return 1;
end catch
return 0;