Question

Error installing .zip Package

When trying to install a package it shows me a  restriction of FOREIGN KEY dbo.Workspace

I The error on the log is:  

2019-10-01 21:20:56,846 Error occurred while installing data "SysModuleInWorkplace_SectionInWorkplaceManager_34e4baa205094f4d88988a10ef915c2d" in package "AutomotiveSalesTech". UId 06e86604-de49-4f88-87f3-9240bf2bc060: The UPDATE statement conflicted with the FOREIGN KEY constraint "FKzsdkQT9ykYN0M2E4ZQ7LhuV0WI". The conflict occurred in database "009641-sales-team", table "dbo.SysWorkplace", column 'Id'.



The statement has been terminated.

UPDATE [dbo].[SysModuleInWorkplace] WITH(ROWLOCK)

SET

    [ModifiedOn] = CONVERT(DATETIME, '2019-10-01 21:20:56.831', 121),

    [ModifiedById] = '{410006E1-CA4E-4502-A9EC-E54D922D2C00}',

    [SysWorkplaceId] = '{E62ECEBD-F734-4076-AB90-323CCE078CD6}',

    [SysModuleId] = '{C1D6B4FC-1611-458F-AAA8-10B8AF4D27BA}'

WHERE

    [Id] = '{34E4BAA2-0509-4F4D-8898-8A10EF915C2D}'

2019-10-01 21:20:56,893 Terrasoft.Common.DbOperationException: The UPDATE statement conflicted with the FOREIGN KEY constraint "FKzsdkQT9ykYN0M2E4ZQ7LhuV0WI". The conflict occurred in database "009641-sales-team", table "dbo.SysWorkplace", column 'Id'.

The statement has been terminated. ---> System.Data.SqlClient.SqlException: The UPDATE statement conflicted with the FOREIGN KEY constraint "FKzsdkQT9ykYN0M2E4ZQ7LhuV0WI". The conflict occurred in database "009641-sales-team", table "dbo.SysWorkplace", column 'Id'.

The statement has been terminated.

   

etc

Like 0

Like

5 comments

Hello Daniel,

The reason of this error is in deleted base "Contact center" workplace (or you are trying to install this package to the application which do not support "Contact center" functionality). We do not recommend deletion of basic system entities and installing packages developed in the application with one version and build to applications with another version and build.

If this basic workplace was deleted please re-add it using this insert query:

insert into SysWorkplace (Id, ProcessListeners, Name, Position, LoaderId, SysApplicationClientTypeId) values ('E62ECEBD-F734-4076-AB90-323CCE078CD6',0,'Contact center', 2, '3707A058-E6A8-4D2C-99CC-D01D9E6B70C6','195785B4-F55A-4E72-ACE3-6480B54C8FA5')

Best regards,

Oscar

Oscar Dylan,

Hello oscar! Thanks for the reply. 

So, i am creating a package that only depends on leads and oportunities. I want to create a Marketplace Add-on. So i don't get why the package may include the "contact center" workplace. How can I avoid this? 

Daniel Lira,

Please use these following packages when creating a new package and specify them as dependent packages for your new package:

MarketingSoftkeyEnu

OrderInSales_OperatorSingleWindow_Softkey_ENU

SalesEnterprise_Marketing_ServiceEnterprise

SalesEnterpriseSoftkey_EN

ServiceEnterpriseSoftkey

These packages should be specified as a must as dependent packages for your new package.

Best regards,

Oscar

Oscar Dylan,

OScar! Thanks again!! 

What if I want to create an Add-on that is compatible with both them licenses and sales enterprise licenses? 

Daniel Lira,

This set of packages is as a must regardless of licenses that you are going to use. You can create a functionality that won't use some of these packages, but still they need to be set as dependent packages for your package.

Show all comments