Substitution Condition

Easily find this page again using the shortlink: https://bct.azrcrv.co.uk/5716

Table Type: Company

Table Name: Substitution Condition
Database Table Name: CRONUS UK Ltd_$Substitution Condition$437dbf0e-84ff-417a-965d-ed2bb9650972

Table Number: 5716

Due to how Dynamics BC tables and columns are named, square brackets need to be wrapped around the table name and column names. Below are example queries showing how Substitution Condition can be queried.

Show/hide an example select of all columns

SELECT
   *
FROM
   [CRONUS UK Ltd_$Substitution Condition$437dbf0e-84ff-417a-965d-ed2bb9650972]

Show/hide an example select of all columns by name

SELECT
   [No_]
   ,[Variant Code]
   ,[Substitute No_]
   ,[Substitute Variant Code]
   ,[Line No_]
   ,[Condition]
   ,[Type]
   ,[Substitute Type]
   ,[$systemId]
   ,[$systemCreatedAt]
   ,[$systemCreatedBy]
   ,[$systemModifiedAt]
   ,[$systemModifiedBy]
FROM
   [CRONUS UK Ltd_$Substitution Condition$437dbf0e-84ff-417a-965d-ed2bb9650972]

Show/hide an example select of all columns including those from all joined tables

SELECT
   *
FROM
   [CRONUS UK Ltd_$Substitution Condition$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Substitution Condition]
LEFT JOIN
   [CRONUS UK Ltd_$Item Variant$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Item Variant]
      ON
         [Substitution Condition].[Variant Code] = [Item Variant].[Code]
LEFT JOIN
   [User] AS [User]
      ON
         [Substitution Condition].[SystemCreatedBy] = [User].[User Security ID]
LEFT JOIN
   [User] AS [User]
      ON
         [Substitution Condition].[SystemModifiedBy] = [User].[User Security ID]

Show/hide columns in Substitution Condition table

Field No.Field NameField CaptionClassTypeLengthSQL Column NameSQL DataType
1No. SearchNo.NormalCode20No_nvarchar(40)
2Variant Code Primary Key SearchVariant CodeNormalCode10Variant Codenvarchar(20)
Key to join to the Item Variant table.

Show/hide example query

SELECT
	       [Substitution Condition].[Variant Code]
	       ,[Item Variant].[Code]
	FROM
	       [CRONUS UK Ltd_$Substitution Condition$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Substitution Condition]
	LEFT JOIN
	       [CRONUS UK Ltd_$Item Variant$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Item Variant]
	              ON
	                     [Substitution Condition].[Variant Code] = [Item Variant].[Code]
3Substitute No. Primary Key SearchSubstitute No.NormalCode20Substitute No_nvarchar(40)
4Substitute Variant Code Primary Key SearchSubstitute Variant CodeNormalCode10Substitute Variant Codenvarchar(20)
5Line No. Primary Key SearchLine No.NormalInteger4Line No_int
6Condition Primary Key SearchConditionNormalText80Conditionnvarchar(160)
100Type SearchTypeNormalOption4Typeint
Available options are:
  • “Item”
  • “Nonstock Item”
101Substitute Type Primary Key SearchSubstitute TypeNormalOption4Substitute Typeint
Available options are:
  • “Item”
  • “Nonstock Item”
2000000000$systemId Primary Key SearchSystem IDNormalGUID16$systemIduniqueidentifier
2000000001SystemCreatedAt SearchCreated AtNormalDateTime8$systemCreatedAtdatetime
2000000002SystemCreatedBy SearchCreated ByNormalGUID16$systemCreatedByuniqueidentifier
Key to join to the User table.

Show/hide example query

SELECT
	       [Substitution Condition].[$systemCreatedBy]
	       ,[User].[User Security ID]
	FROM
	       [CRONUS UK Ltd_$Substitution Condition$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Substitution Condition]
	LEFT JOIN
	       [User] AS [User]
	              ON
	                     [Substitution Condition].[$systemCreatedBy] = [User].[User Security ID]
2000000003SystemModifiedAt SearchModified AtNormalDateTime8$systemModifiedAtdatetime
2000000004SystemModifiedBy SearchModified ByNormalGUID16$systemModifiedByuniqueidentifier

Leave a Reply

Your email address will not be published. Required fields are marked *