How to get the Branch Office from a Job

VB.NET code to get the name of the immediate parent Branch, Laydown Yard or Staging Area for a Job.

'Get immediate parent Branch or Laydown Yard
Dim job As StockingLocation = StockingLocation.GetStockingLocation(StockingLocationID-For-Job, False)
job.ParentBranchOrLaydown.Name

'Get immediate parent Branch or Laydown Yard or Staging Area
Dim job As StockingLocation = StockingLocation.GetStockingLocation(StockingLocationID-For-Job, False)
job.ParentBranchOrLaydownOrStagingArea.Name

How about getting the parent branch for the job regardless of whether the job falls beneath a laydown yard and/or staging area?

That method returns the parent of the same type. Branch offices, laydown yards, and staging areas are all the same, so you have to do a bit of manual traversing up the tree.