If the area "default" was chosen when uploading?
How can I change this behavior?
I wrote this database trigger for the document problem:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =====================================================
-- Author: Sven Gak
-- Create date: 01.12.2020
-- Description: Setzte die benötigten Dokumentenrechte
-- =====================================================
CREATE TRIGGER OverwriteDocumentArea
ON [dbo].[Library]
AFTER INSERT
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
declare @SecTerr int, @UserId int, @UserSecTerr int, @LibraryId int;
SELECT @SecTerr = inserted.Libr_SecTerr, @UserId = inserted.Libr_CreatedBy, @LibraryId = inserted.Libr_LibraryId FROM inserted;
IF (ISNULL(@SecTerr, 0) = 0 OR ISNULL(@SecTerr, 0) = -2147483644)
BEGIN
SELECT @UserSecTerr = User_PrimaryTerritory FROM Users WHERE User_UserId = @UserId;
UPDATE [dbo].[Library] SET Libr_SecTerr = @UserSecTerr WHERE Libr_LibraryId = @LibraryId
END
END
GO
Cheers for raising this, it should be reported to Sage support. I have managed to replicate the problem in my version as well. You could adjust your Trigger script to pick up the territory of the record it is going against (e.g. Case/Oppo/Order and if any of those are null then default to the company).
Please do log a case.
*Community Hub is the new name for Sage City