Using variables in GP Batch Code names

Using variables in GP Batch Code names

Variables in batch codes were introduced in version 6.5. Dynamics GP batch codes can be 15 characters or less. If your configured batch code exceeds 15 characters, it will be automatically trimmed.

Common Variables

The following variables are applicable to all variable-enabled batch codes:

  • CreatedTime
  • SubmitTime
  • CreateUserName
  • CreateDeviceName
  • ProfileName

Batch Code Variables by Transaction Type

BatchCodeForAdjustments

  • AdjustmentReasonCode
  • CostCenterCode
  • FlexField1 through 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 in 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 (Add Asset)

  • AssetClassCode
  • AssetCode
  • AssetCodeSuffix
  • AssetCustodianCode
  • AssetLabel
  • AssetShortName
  • AssetStructureCode
  • MasterAssetCode

BatchCodeForReceipts (Receiving Inventory)

  • FlexField1, FlexField2
  • PackageCode
  • PurchaseOrderCode
  • VendorCode

BatchCodeForReturns

  • AddressCode
  • BillingAddressCode
  • CheckbookCode
  • CustomerCode
  • CustomerName
  • DiscountAmount
  • FlexField1 through FlexField4
  • LineTotal
  • MiscChargeAmount
  • PaymentTermsCode
  • SalesOrderCode
  • SalespersonCode
  • SiteCode
  • SubtotalAmount
  • TaxAmount
  • TaxScheduleCode
  • TotalAmount

BatchCodeForShipOrder

  • Carrier
  • FlexField1 through FlexField3
  • SalesOrderCode
  • ShipMethod
  • ShippingBoxCode
  • TrackingCode
  • CurrentBatch (Added in 7.4.6.18+)

BatchCodeForSpotCounts

  • BinCode
  • ItemCode
  • LotCode
  • SerialCode
  • SiteCode
  • TrackingOption
  • UnitOfMeasure

BatchCodeForTransfers (Site and Directed Transfers)

  • CreatedByProcInbTrans
  • FlexField1, FlexField2
  • OrderGroupCode
  • ReasonCode
  • ShipMethodCode
  • ToBSMEMFacilityCode
  • TransferOrderCode

BatchCodeForTransfers (Project Transfers)

  • CostCategoryCode
  • FlexField1, FlexField2
  • ProjectCode

BatchCodeForTransfers (Container Transfers)

  • ContainerCode
  • FromSiteCode
  • HostBinCode
  • ToSiteCode

BatchCodeForVendorReturns

  • FlexField1, FlexField2
  • ReturnReasonCode
  • RmaReferenceInfo
  • ShipMethodCode
  • VendorCode

BatchCodeForVerifiedOrders

Note: This may not work as expected if you are using the EnableOrderVerifiedBatchCodeAsPrefix setting.

  • FlexField1, FlexField2
  • SalesOrderCode

Format Examples

Date and Username

Format: [CreatedTime:MMddyy]-[CreateUserName]

Example: 032814-DefaultU (truncated at 15 characters)

FlexField and Static String

Format: [FlexField1]-PTGPReceipt

Example: LW4-PTGPReceipt

    • Related Articles

    • Using variables in GP Batch Code names

      Variables in batch codes were introduced in version 6.5. Dynamics GP batch codes can be 15 characters or less. If your configured batch code exceeds 15 characters, it will be automatically trimmed. Common Variables The following variables are ...
    • Setting Batch ID's for Dynamics GP posting

      You can assign different Batch IDs per profile in PanatrackerGP. This allows you to separate batches by user, site location, or handheld device. Configure Batch IDs per Transaction Type Navigate to Transaction Manager > Inventory Settings. Locate the ...
    • Setting Batch ID's for Dynamics GP posting

      You can assign different Batch IDs per profile in PanatrackerGP. This allows you to separate batches by user, site location, or handheld device. Configure Batch IDs per Transaction Type Navigate to Transaction Manager > Inventory Settings. Locate the ...
    • GP Modern Lifecycle policy and PanatrackerGP adapter versions

      PanatrackerGP uses internal Dynamics GP version numbers (such as "18.x") to identify adapter compatibility with Dynamics GP Modern Lifecycle releases. This approach provides clear version references for installation and support. Microsoft's Modern ...
    • Site Transfer Fails with eConnect Error 1356 "Batch Is Currently Being Posted"

      Site Transfer Fails with eConnect Error 1356 "Batch Is Currently Being Posted" Symptom Submitting a Site Transfer in PanatrackerGP fails, and Dynamics GP rejects it through eConnect with error 1356 (stored procedure taIVTransferHeaderInsert): “Batch ...