Setup Variables for Batch Codes

In version 6.5, variables in batch codes were introduced.  In Dynamics GP, batch codes can be 15 characters or less, so please keep that in mind while configuring your batch codes.  If your configured batch code comes out to more than 15 characters, we will trim off the extra characters.  The basic variables that are applicable to all variable enabled batch codes:

  • CreatedTime
  • SubmitTime
  • CreateUserName
  • CreateDeviceName
  • ProfileName

The following are the batch codes that support variables and their corresponding variables:

  • BatchCodeForAdjustments
    • AdjustmentReasonCode
    • CostCenterCode
    • FlexField1
    • FlexField2
    • FlexField3
    • FlexField4
    • FlexField5
    • Operation (Add or Remove)
    • ProjectCode
    • TaskCode
    • WS_CostCode
    • WS_JobNumber
    • WS_Module
    • WorkOrderCode
  • BatchCodeForAssemblies
    • BinCode
    • FlexField1
    • FlexField2
    • ItemCode
    • LotCode
    • SerialCode
    • SiteCode
    • TrackingOption
    • UnitOfMeasure
  • BatchCodeForCashReceipt
    • CheckbookCode
    • CustomerCode
    • SalespersonCode
  • BatchCodeForCompletedDelivery
    • CustomerCode
    • CustomerName
    • SalesOrderCode
    • SiteCode
  • BatchCodeForCompletedOrderFulfill and BatchCodeForPartialPicks
    • OrderGroupCode
    • SalesOrderCode
    • CurrentBatch – Added 7.4.6.18+
  • BatchCodeForNewOrder
    • AddressCode
    • CheckbookCode
    • CustomerCode
    • CustomerName
    • CustomerPurchaseOrderCode
    • DiscountAmount
    • LineTotal
    • MiscChargeAmount
    • PaymentTermsCode
    • RequestedShipDate
    • SalesOrderCode
    • SalespersonCode
    • ShipMethodCode
    • SiteCode
    • SubtotalAmount
    • TaxAmount
    • TaxScheduleCode
    • TotalAmount
  • BatchCodeForNewSale (Used for online and offline sales)
    • AddressCode – Offline Sales Only
    • BillingAddressCode – Online Sales Only
    • CheckbookCode
    • CustomerCode
    • CustomerName
    • CustomerPurchaseOrderCode
    • DiscountAmount
    • LineTotal
    • MiscChargeAmount
    • PaymentTermsCode
    • SalesOrderCode
    • SalespersonCode
    • ShippingAddressCode – Online Sales Only
    • SiteCode
    • SubtotalAmount
    • TaxAmount
    • TaxScheduleCode
    • TotalAmount
  • BatchCodeForReceipts – with usage in Add Asset
    • AssetClassCode
    • AssetCode
    • AssetCodeSuffix
    • AssetCustodianCode
    • AssetLabel
    • AssetShortName
    • AssetStructureCode
    • MasterAssetCode
  • BatchCodeForReceipts – with usage in Receiving Inventory
    • FlexField1
    • FlexField2
    • PackageCode
    • PurchaseOrderCode
    • VendorCode
  • BatchCodeForReturns
    • AddressCode
    • BillingAddressCode
    • CheckbookCode
    • CustomerCode
    • CustomerName
    • DiscountAmount
    • FlexField1
    • FlexField2
    • FlexField3
    • FlexField4
    • LineTotal
    • MiscChargeAmount
    • PaymentTermsCode
    • SalesOrderCode
    • SalespersonCode
    • SiteCode
    • SubtotalAmount
    • TaxAmount
    • TaxScheduleCode
    • TotalAmount
  • BatchCodeForShipOrder
    • Carrier
    • FlexField1
    • FlexField2
    • FlexField3
    • SalesOrderCode
    • ShipMethod
    • ShippingBoxCode
    • TrackingCode
    • CurrentBatch – Added 7.4.6.18+
  • BatchCodeForSpotCounts
    • BinCode
    • ItemCode
    • LotCode
    • SerialCode
    • SiteCode
    • TrackingOption
    • UnitOfMeasure
  • BatchCodeForTransfers – with usage with Site Transfers and Directed Transfers
    • CreatedByProcInbTrans
    • FlexField1
    • FlexField2
    • OrderGroupCode
    • ReasonCode
    • ShipMethodCode
    • ToBSMEMFacilityCode
    • TransferOrderCode
  • BatchCodeForTransfers – with usage with Project Transfers
    • CostCategoryCode
    • FlexField1
    • FlexField2
    • ProjectCode
  • BatchCodeForTransfers – with usage with Container Transfers
    • ContainerCode
    • FromSiteCode
    • HostBinCode
    • ToSiteCode
  • BatchCodeForVendorReturns
    • FlexField1
    • FlexField2
    • ReturnReasonCode
    • RmaReferenceInfo
    • ShipMethodCode
    • VendorCode
  • BatchCodeForVerifiedOrders – Please be wary that this may not work as expected if you are using the setting EnableOrderVerifiedBatchCodeAsPrefix
    • FlexField1
    • FlexField2
    • SalesOrderCode

Examples on How to Format Batch Codes

  • Date and Username
    • Format: [CreatedTime:MMddyy]-[CreateUserName]
    • Example: 032814-DefaultU (notice this is cut off at 15 characters)
  • FlexField1 and Static String
    • Format: [FlexField1]-PTGPReceipt
    • Example: LW4-PTGPReceipt

Was this helpful?