var result = PXSelectReadonly2<PX.Objects.GL.Branch,
InnerJoin<PX.Objects.GL.DAC.Organization, On<PX.Objects.GL.DAC.Organization.organizationID, Equal<PX.Objects.GL.Branch.organizationID>>,
InnerJoin<PX.Objects.CR.BAccount, On<PX.Objects.CR.BAccount.bAccountID, Equal<PX.Objects.GL.DAC.Organization.bAccountID>>,
InnerJoin<PX.Objects.CR.Contact, On<PX.Objects.CR.Contact.contactID, Equal<PX.Objects.CR.BAccount.defContactID>>>>>,
Where<PX.Objects.GL.Branch.branchID, Equal<Required<PX.Objects.GL.Branch.branchID>>>>.Select(graph, graph.Accessinfo.BranchID);
foreach(PXResult<PX.Objects.GL.Branch, PX.Objects.GL.DAC.Organization, PX.Objects.CR.BAccount, PX.Objects.CR.Contact> xResult in result) {
PX.Objects.GL.Branch branch = (PX.Objects.GL.Branch)xResult;
PX.Objects.GL.DAC.Organization org = (PX.Objects.GL.DAC.Organization)xResult;
PX.Objects.CR.BAccount baAcc = (PX.Objects.CR.BAccount)xResult;
PX.Objects.CR.Contact contact = (PX.Objects.CR.Contact)xResult;
UserTranInfo.ContactName = contact.Attention;
UserTranInfo.ContactEmail = contact.EMail;
UserTranInfo.ContactPhone1 = contact.Phone1;
UserTranInfo.ContactPhone2 = contact.Phone2;
}