Sunday, March 23, 2025

LSC View to identify replication counters for transaction headers with missing lines

SELECT TH.Date, TH.[POS Terminal No_], TH.[Entry Status], COUNT(TSE.[Line No_]) AS Lines, TH.[Replication Counter] AS FirstReplCounter, TH.[Net Amount]

FROM     dbo.[Cronus$Transaction Header$5ecfc871-5d82-43f1-9c54-59685e82318d] AS TH LEFT OUTER JOIN

                  dbo.[Cronus$Trans_ Sales Entry$5ecfc871-5d82-43f1-9c54-59685e82318d] AS TSE ON TH.[Store No_] = TSE.[Store No_] AND TH.[POS Terminal No_] = TSE.[POS Terminal No_] AND TH.[Transaction No_] = TSE.[Transaction No_]

GROUP BY TH.[Entry Status], TH.[POS Terminal No_], TH.Date, TH.[Replication Counter], TH.[Net Amount]

HAVING (COUNT(TSE.[Line No_]) < 1) AND (TH.[Entry Status] <> 3) AND (TH.Date > CONVERT(DATETIME, '2025-03-20 00:00:00', 102)) AND (TH.[Net Amount] <> 0)

Monday, March 10, 2025

Power BI - Change data source with new semantic model

  •  Record any filters on the data source
  • Record any relationships
  • Share the original semantic model with the person building the new report
  • Download new report
  • Get Data>Power BI Semantic Models>Select Tables
  • Re-enter relationships
  • Fix any graphics
  • Publish

Use Oauth2>Private>Sign in with office account

Saturday, March 8, 2025

LS Retail - Replication Counters - sometimes transactions get skipped

  • This can happen if the replication counter values on the records get changed in a way that causes a gap between numbers. Usually happens when a machine is repurposed, and old transactions are not fully purged, causing replication counter numbers to do unpredictable things
  • Check the replication counter field in the transaction header by day by terminal and compare to the pos db to confirm if the numbers make sense
  select * FROM [GFH].[dbo].[Cronus$Scheduler Replication Counter$5ecfc871-5d82-43f1-9c54-59685e82318d]
  where [Scheduler Job ID] in ('TRANSKJB','TRANSMSQ')

SELECT [POS Terminal No_], MIN([Replication Counter]) AS FirstReplCounter, MAX([Replication Counter]) AS LastReplCounter, [Store No_]
FROM     [Cronus$Transaction Header$5ecfc871-5d82-43f1-9c54-59685e82318d]
GROUP BY [POS Terminal No_], [Store No_]

SELECT TOP (1000) [POS Terminal No_], MIN([Replication Counter]) AS FirstReplCounter, MAX([Replication Counter]) AS LastReplCounter, [Store No_]
FROM     [Cronus$Trans_ Sales Entry$5ecfc871-5d82-43f1-9c54-59685e82318d]
GROUP BY [POS Terminal No_], [Store No_]

Friday, February 21, 2025

LSC Member Points

  •  Redemption rate
    • Retail Currencies>Create LOY>Set exchange rate
    • Member Club>Points Setup>For each scheme, define a currency code

Tuesday, February 4, 2025

Wednesday, January 22, 2025

Business Central - SQL job to Auto Restart Error jobs in job queue

 update [Cronus$Job Queue Entry$437dbf0e-84ff-417a-965d-ed2bb9650972]

  set Status = 0

  where [Object ID to Run]<> 260 and [Recurring Job] = 1 and Status = 2 and [User ID]= 'Cronus\Administrator'

-------------------------------------------

Job Queue: codeunit 99001469

Parameter string: LSRSCHEDULER NAS_MISC,LOG=1, REPEAT=0


-----------------------------------------------

--Clear excessive197 jobs


delete FROM [Cronus].[dbo].[Cronus$Job Queue Entry$437dbf0e-84ff-417a-965d-ed2bb9650972]

  where [Object ID to Run] = 197

Wednesday, January 8, 2025

Power BI - How to connect to an excel file in your sharepoint or teams

  1.  Open file in sharepoint
  2. Open file in excel
  3. Go to File>Info>Copy Path
    1. It will look like this 
    2. https://mysite.sharepoint.com/sites/Shared%20Documents/myfile.csv?web=1
  4. Remove the ?web=1 so the link looks like this
    1. https://mysite.sharepoint.com/sites/Shared%20Documents/myfile.csv
  5. In power BI>Get Data>Web>Enter this address>enter your login info
  6. When you try to update the semantic model in power BI, you'll get another error saying credentials are missing
    1. Click on the semantic model>three dots>settings
    2. Data source credentials>Look for your web data sources
      1. Authentication method = OAuth2
      2. Privacy Level = Private
      3. It will prompt for your user credentials
      4. Data source will now be active