...
Parent - Se baseia na própria tabela APPRetailEntity, ou seja, o campo ID (PK) referencia referência o campo Parent. Para saber qual é o Parent, deve-se buscar todas os níveis de ParentLevel do CustomerID em questão e escolher o nível amis mais próximo anterior ao 5.
ParentLevel - 5 (Para Loja)
...
SELECT top 10 * from APPRetailLog (nolock) where...Modulo = 'Orders'...
Ex:
SELECT TOP 5 * FROM APPRetailLog (nolock)
where Modulo = 'Orders' and Mensagem like '382_8 {%092222439%'
order by 1 desc
for xml path, root('Orders')
4 – Reenviar informações de Orders por exemplo.
Ex:
USE LiveUtil
BEGIN TRY
BEGIN TRANSACTION
UPDATE APPRETAILCONFIGURATION SET ULTIMAEXECUCAOORDER = '2022-09-01' WHERE CUSTOMERID = 8
COMMIT TRANSACTION
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION
END CATCH
IMPORTANTE: Sempre antes de iniciar a análise sobre falta de informações no RetailApp verificar se as informações solicitadas pelo cliente realmente existem no TVFR (DataBase Rentech).Modelo de Script completo:
PONTOS DE ATENÇÃO:
* Ficar atento se o servidor está correto (L’Oréal, Live40, UA)
...