SQL Scripts for Microsoft Dynamics GP: Vendors With Emails From Primary, Remit and Purchase Addresses

Microsoft Dynamics GPThis script is part of the SQL Scripts for Microsoft Dynamics GP where I will be posted the scripts I wrote against Microsoft Dynamics GP over the 19 years before I stopped working with Dynamics GP.

This script was created to allow a user to check information; it returns basic information on the vendor along with bank details and email addresses for the addresses linked to the vendor as primary, remit to and purchases fields.

/*
Created by Ian Grieve of azurecurve | Ramblings of an IT Professional (http://www.azurecurve.co.uk) This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int). */
SELECT ['PM Creditor Master'].VENDORID ,['PM Creditor Master'].VENDNAME ,CASE ['PM Creditor Master'].HOLD WHEN 0 THEN '' ELSE 'On Hold' END AS HOLD ,['PM Creditor Master'].TXRGNNUM AS VatNumber ,['PM Creditor Address Master'].PHNUMBR1 AS PhoneNumber ,['PM Creditor Address Master'].ADDRESS1 AS AddressLineOne ,['PM Creditor Address Master'].ADDRESS2 AS AddressLineTwo ,['PM Creditor Address Master'].ADDRESS3 AS AddressLineThree ,['PM Creditor Address Master'].CITY AS City ,['PM Creditor Address Master'].STATE AS County ,['PM Creditor Address Master'].ZIPCODE AS PostCode ,ISNULL(['Internet Addresses'].EmailToAddress,'') AS EmailAddress ,['Address Electronic Funds Transfer Master'].BANKNAME AS BankName ,['Address Electronic Funds Transfer Master'].EFTBankCode AS SortCode ,['Address Electronic Funds Transfer Master'].EFTBankAcct AS AccountNumber ,['Internet Addresses - Remittance'].EmailToAddress AS RemittanceEmailAddress ,['Internet Addresses - Purchase Order'].EmailToAddress AS PurchaseOrderEmailAddress ,['PM Creditor Master'].TXRGNNUM AS CompanyRegistrationNumber FROM PM00200 AS ['PM Creditor Master'] INNER JOIN PM00300 AS ['PM Creditor Address Master'] ON ['PM Creditor Address Master'].VENDORID = ['PM Creditor Master'].VENDORID AND ['PM Creditor Address Master'].ADRSCODE = ['PM Creditor Master'].VADCDPAD LEFT JOIN SY01200 AS ['Internet Addresses'] ON ['Internet Addresses'].Master_Type = 'VEN' AND ['Internet Addresses'].Master_ID = ['PM Creditor Master'].VENDORID AND ['Internet Addresses'].ADRSCODE = ['PM Creditor Master'].VADCDPAD LEFT JOIN SY01200 AS ['Internet Addresses - Remittance'] ON ['Internet Addresses - Remittance'].Master_Type = 'VEN' AND ['Internet Addresses - Remittance'].Master_ID = ['PM Creditor Master'].VENDORID AND ['Internet Addresses - Remittance'].ADRSCODE = ['PM Creditor Master'].VADCDTRO LEFT JOIN SY01200 AS ['Internet Addresses - Purchase Order'] ON ['Internet Addresses - Purchase Order'].Master_Type = 'VEN' AND ['Internet Addresses - Purchase Order'].Master_ID = ['PM Creditor Master'].VENDORID AND ['Internet Addresses - Purchase Order'].ADRSCODE = ['PM Creditor Master'].VADCDTRO LEFT JOIN SY06000 AS ['Address Electronic Funds Transfer Master'] ON ['Address Electronic Funds Transfer Master'].SERIES = 4 AND ['Address Electronic Funds Transfer Master'].VENDORID = ['PM Creditor Master'].VENDORID AND ['Address Electronic Funds Transfer Master'].ADRSCODE = ['PM Creditor Master'].VADCDTRO WHERE ['PM Creditor Master'].VENDSTTS = 1

Excel Snippets: Add n Months to Current Date

MicrosoftI might not post many Excel snippets, but I’m collecting them into a small Excel Snippets series to make them easy to find.

I was have a tendency to track personal financial data in Excel and was recently updating my electricity usage sheet and wanted to set a date column to auto incremement by one month for each row. I did some checking and found that the EDATE function can be used to get the same date of the previous or future months based on the second parameter.

The structure opf the function calls is shown below:

=EDATE(start date, number of months)

For example, if I wanted to add one month to todays date, I would use the following:

=EDATE(Now(), 1)

SQL Scripts for Microsoft Dynamics GP: GL Account Transactions With Amount in One Column

Microsoft Dynamics GPThis script is part of the SQL Scripts for Microsoft Dynamics GP where I will be posted the scripts I wrote against Microsoft Dynamics GP over the 19 years before I stopped working with Dynamics GP.

This script was created a while ago for a client who wanted a SQL query to use in SSRS; it was put together in conjunction with the finance team to return the data exactly as they wanted (including one column with the amount shown as a positive or negative) it and then passed across to someone in IT to wrap the SSRS report around it.

/*
Created by Ian Grieve of azurecurve | Ramblings of an IT Professional (http://www.azurecurve.co.uk) This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int). */
SELECT GLT.SOURCDOC AS 'Source Document' ,GLT.JRNENTRY AS 'Journal Entry' ,GLT.SERIES AS 'Series' ,GLT.TRXDATE AS 'TRX Date' ,GL105.ACTNUMST AS 'Account Number' ,GL100.ACTDESCR AS 'Account Description' ,GLT.Amount AS 'Amount' ,GLT.PERIODID AS 'Period ID' ,GLT.USWHPSTD AS 'User Who Posted' ,GLT.REFRENCE AS 'Reference' ,GLT.DSCRIPTN AS 'Description' ,GL105.ACTNUMBR_3 AS 'Segment 3' ,GLT.ORMSTRNM AS 'Original Master Name' ,GL100.USERDEF2 AS 'User Defined 2' ,GL100.USRDEFS1 AS 'User Defined 3' ,GL100.USRDEFS2 AS 'User Defined 4' ,GL100.ACTNUMBR_1 AS 'Segment 1' ,GLT.ORCTRNUM AS 'Originating Control Number' FROM (SELECT ACTINDX,OPENYEAR AS 'Year',GLH.JRNENTRY,TRXDATE,SOURCDOC,SERIES,CASE WHEN DEBITAMT > 0 THEN DEBITAMT ELSE CRDTAMNT *-1 END AS 'Amount' ,PERIODID,USWHPSTD,REFRENCE,DSCRIPTN,ORMSTRNM,ORCTRNUM FROM GL10001 AS GLL WITH (NOLOCK) INNER JOIN GL10000 AS GLH WITH (NOLOCK) ON GLH.JRNENTRY = GLL.JRNENTRY UNION ALL SELECT ACTINDX,OPENYEAR AS 'Year', JRNENTRY,TRXDATE,SOURCDOC,SERIES,CASE WHEN DEBITAMT > 0 THEN DEBITAMT ELSE CRDTAMNT *-1 END AS 'Amount' ,PERIODID,USWHPSTD,REFRENCE,DSCRIPTN,ORMSTRNM,ORCTRNUM FROM GL20000 WITH (NOLOCK) UNION ALL SELECT ACTINDX,HSTYEAR AS 'Year',JRNENTRY,TRXDATE,SOURCDOC,SERIES,CASE WHEN DEBITAMT > 0 THEN DEBITAMT ELSE CRDTAMNT *-1 END AS 'Amount' ,PERIODID,USWHPSTD,REFRENCE,DSCRIPTN,ORMSTRNM,ORCTRNUM FROM GL30000 WITH (NOLOCK) ) AS GLT INNER JOIN GL00105 AS GL105 WITH (NOLOCK) ON GL105.ACTINDX = GLT.ACTINDX INNER JOIN GL00100 AS GL100 WITH (NOLOCK) ON GL100.ACTINDX = GL105.ACTINDX

In Microsoft Dynamics 365 Business Central (Customisation), how do I… Personalize Card Pages

Microsoft Dynamics 365 Business CentralThis post is part of the In Microsoft Dynamics 365 Business Central (Customisation), how do I… series and of the wider In Microsoft Dynamics 365 Business Central, how do I… series which I am posting as I familiarise myself with Microsoft Dynamics 365 Business Central.

As with other pages in Dynamics BC, it is possible to personalize a card page, with the following actions available:

  • Add fields to fasttabs.
  • Remove fields from fasttabs.
  • Reorder fasttabs.
  • Move a field between the “show more” and “show less” toggles.
  • Toggle field to show when the fasttab is collapsed.
  • Exclude from quick entry.

To personalize a card page, click the Settings cog in the top right corner and select Personalize:

Settings menu

Continue reading “In Microsoft Dynamics 365 Business Central (Customisation), how do I… Personalize Card Pages”