![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/865bdc5b-dcce-4891-ad2d-54ee5351b4c5.png)
PX.Objects.CR.BAccount objBAccount = PXSelectJoin<PX.Objects.CR.BAccount,
InnerJoin<Organization, On<Organization.bAccountID, Equal<PX.Objects.CR.BAccount.bAccountID>>,
InnerJoin<PX.Objects.GL.Branch,On<PX.Objects.GL.Branch.organizationID,Equal<Organization.organizationID>>>>,
Where<PX.Objects.GL.Branch.branchID,Equal<Required<PX.Objects.GL.Branch.branchID>>>>.
Select(customerMaint, customerMaint.Accessinfo?.BranchID);
if (objBAccount != null)
{
OrganizationMaint OMaint = PXGraph.CreateInstance<OrganizationMaint>();
OrganizationBAccount OBAccount = PXSelect<OrganizationBAccount, Where<OrganizationBAccount.bAccountID,
Equal<Required<OrganizationBAccount.bAccountID>>>>.Select(OMaint, objBAccount?.BAccountID);
if (OBAccount != null)
{
OMaint.BAccount.Current = OBAccount;
PX.Objects.CR.Address MainAddress = OMaint.GetExtension<OrganizationMaint.DefContactAddressExt>().DefAddress.Select()[0];
PX.Objects.CR.Contact MainContact = OMaint.GetExtension<OrganizationMaint.DefContactAddressExt>().DefContact.Select()[0];
// Get The Address Details from MainAddress object
//Get the Contact Details from MainContact object
}
}
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.