I have created a GI that dpending on selected “Module” should navigate to the source document in my side panels. For example “AP” should navigate to “Bills & Adjustments”. Here is partial data from my result grid
I know my keys are DocType and RefNbr. So here is how I have set up my Navigation Parameters and Visibility Conditions
I have two problems.
When I click on the hyperlink or record it doesn’t show the related document in the side panel.
In my GI the navigation Icon is always invisible with this condition. If I deactivate the condition then it becomes visible
What I am doing wrong?
Page 1 / 1
Hi @aaghaei Can you please share the XML format of this GI and also let us know the version and build?
Hi @Naveen Boga Thank you for taking time to help with this. I am using 21R2 21.205.0063.
please find the attached XML.Also you will need to create the below view (Actualy just part of the UNION view I use to collect all modules in one view) and DAC
SQL View:
CREATE VIEW Wdbo].]UDCVEPApprovalPending] AS
/******************** AP Bills & Adjustments ********************/ SELECT >APRG].]CompanyID] AS SCompanyID], >APRG].]BranchID] AS SBranchID], 'AP' AS SModule], CASE ISNULL(LAPRG].]DocType], '') WHEN 'INV' THEN 'Bill' WHEN 'ACR' THEN 'Credit Adj.' WHEN 'ADR' THEN 'Debit Adj.' WHEN 'PPM' THEN 'Prepayment' ELSE '' END AS SDocType], >APIN].]RefNbr] AS SRefNbr], >APIN].]InvoiceNbr] AS SDocNbr], >APRG].]DocDate] AS SDocDate], ISNULL(LAPRG].]DocDesc], '') AS SDocDesc],
CONVERT(VARCHAR(6), ,APRG].]TranPeriodID]) AS STranPeriodID], CONVERT(VARCHAR(6), ,APRG].]FinPeriodID]) AS SFinPeriodID],
CASE ISNULL(LAPRG].]Status], '') WHEN 'H' THEN 'Data Entry' ELSE 'Pending Approval' END AS SStatus],
>GLCO].]OrganizationCD] AS SOrganizationID], >GLCO].]OrganizationName] AS SOrganizationName],
>APVM].]AcctCD] AS SVendorID], >APVM].]AcctName] AS SVendorName],
CASE ISNULL(LPMPM].]ContractID], 0) WHEN 0 THEN '' ELSE EPMPM].]ContractCD] END AS SProjectID], CASE ISNULL(LPMPM].]ContractID], 0) WHEN 0 THEN '' ELSE EPMPM].]Description] END AS SProjectName],
ISNULL(LEPOW].]ContactID], ,APOW].]ContactID]) AS SUserID], ISNULL(LEPOW].]DisplayName], ,APOW].]DisplayName]) AS SUserName], ISNULL(LEPAP].]CreatedDateTime], ,APRG].]CreatedDateTime]) AS SDateAssigned],
+ISNULL(LAPIN].]UsrCFCuryLineTotalCost], 0) AS SCost], +ISNULL(LAPIN].]UsrCFCuryLineTotalTax], 0) AS STax], +ISNULL(LAPIN].]UsrCFCuryLineTotalCost], 0) +ISNULL(LAPIN].]UsrCFCuryLineTotalTax], 0) AS SAmount]
FROM >dbo].]APInvoice] APIN] INNER JOIN >dbo].]APRegister] APRG] ON NAPIN].]CompanyID] = =APRG].]CompanyID] AND DAPIN].]DocType] = =APRG].]DocType] AND DAPIN].]RefNbr] = =APRG].]RefNbr] INNER JOIN >dbo].]Branch] GLBR] ON NAPRG].]CompanyID] = =GLBR].]CompanyID] AND DAPRG].]BranchID] = =GLBR].]BranchID] INNER JOIN >dbo].]Organization] ]GLCO] ON NAPRG].]CompanyID] = =GLCO].]CompanyID] AND DGLBR].]OrganizationID] = =GLCO].]OrganizationID] INNER JOIN >dbo].]BAccount] APVM] ON NAPRG].]CompanyID] = =APVM].]CompanyID] AND DAPRG].]VendorID] = =APVM].]BAccountID] LEFT JOIN >dbo].]Contract] PMPM] ON NAPRG].]CompanyID] = =PMPM].]CompanyID] AND DAPRG].]ProjectID] = =PMPM].]ContractID] LEFT JOIN >dbo].]EPApproval] EPAP] ON NAPRG].]CompanyID] = =EPAP].]CompanyID] AND DAPRG].]NoteID] = =EPAP].]RefNoteID] LEFT JOIN >dbo].]Contact] APOW] ON NAPRG].]CompanyID] = =APOW].]CompanyID] AND DAPRG].]EmployeeID] = =APOW].]ContactID] LEFT JOIN >dbo].]Contact] EPOW] ON NEPAP].]CompanyID] = =EPOW].]CompanyID] AND DEPAP].]OwnerID] = =EPOW].]ContactID] WHERE ISNULL(LAPRG].]Status], '') IN ('H', 'E') AND -- 'On Hold', 'Pending Approval' ISNULL(LAPRG].]DeletedDatabaseRecord], '0') = '0' AND ISNULL(LEPAP].]Status], 'P') = 'P' GO
--Vmsql GO
DAC
using System; using PX.Data; using PX.Objects.CM; using PX.Objects.GL;
namespace UDApprovalWorkflow { Serializable] PXCacheName("Approval Hold and Pending")] public class UDCVEPApprovalPending : IBqlTable { #region BranchID Branch(DisplayName = "Branch", Visibility = PXUIVisibility.SelectorVisible, Required = true, Enabled = false, Visible = true)] public virtual Int32? BranchID { get; set; } public abstract class branchID : PX.Data.BQL.BqlInt.Field<branchID> { } #endregion
#region Module PXDBString(2, IsFixed = true, InputMask = "")] PXUIField(DisplayName = "Module")] public virtual string Module { get; set; } public abstract class module : PX.Data.BQL.BqlString.Field<module> { } #endregion
#region DocType PXDBString(20, IsUnicode = true, InputMask = "")] PXUIField(DisplayName = "Doc Type")] public virtual string DocType { get; set; } public abstract class docType : PX.Data.BQL.BqlString.Field<docType> { } #endregion
#region RefNbr PXDBString(15, IsUnicode = true, InputMask = "")] PXUIField(DisplayName = "Ref Nbr")] public virtual string RefNbr { get; set; } public abstract class refNbr : PX.Data.BQL.BqlString.Field<refNbr> { } #endregion
#region DocNbr PXDBString(40, IsUnicode = true, InputMask = "")] PXUIField(DisplayName = "Doc Nbr")] public virtual string DocNbr { get; set; } public abstract class docNbr : PX.Data.BQL.BqlString.Field<docNbr> { } #endregion
#region DocDate PXDBDate()] PXUIField(DisplayName = "Doc Date")] public virtual DateTime? DocDate { get; set; } public abstract class docDate : PX.Data.BQL.BqlDateTime.Field<docDate> { } #endregion
#region DocDesc PXDBString(512, IsUnicode = true, InputMask = "")] PXUIField(DisplayName = "Doc Desc")] public virtual string DocDesc { get; set; } public abstract class docDesc : PX.Data.BQL.BqlString.Field<docDesc> { } #endregion
#region TranPeriodID PeriodID()] PXUIField(DisplayName = "Tran Period")] public virtual string TranPeriodID { get; set; } public abstract class tranPeriodID : PX.Data.BQL.BqlString.Field<tranPeriodID> { } #endregion
#region Status PXDBString(16, InputMask = "")] PXUIField(DisplayName = "Status")] public virtual string Status { get; set; } public abstract class status : PX.Data.BQL.BqlString.Field<status> { } #endregion
#region OrganizationID PXDBString(30, IsUnicode = true, InputMask = "")] PXUIField(DisplayName = "Organization ID")] public virtual string OrganizationID { get; set; } public abstract class organizationID : PX.Data.BQL.BqlString.Field<organizationID> { } #endregion
#region OrganizationName PXDBString(60, IsUnicode = true, InputMask = "")] PXUIField(DisplayName = "Organization Name")] public virtual string OrganizationName { get; set; } public abstract class organizationName : PX.Data.BQL.BqlString.Field<organizationName> { } #endregion
#region VendorID PXDBString(30, IsUnicode = true, InputMask = "")] PXUIField(DisplayName = "Vendor ID")] public virtual string VendorID { get; set; } public abstract class vendorID : PX.Data.BQL.BqlString.Field<vendorID> { } #endregion
#region VendorName PXDBString(255, IsUnicode = true, InputMask = "")] PXUIField(DisplayName = "Vendor Name")] public virtual string VendorName { get; set; } public abstract class vendorName : PX.Data.BQL.BqlString.Field<vendorName> { } #endregion
#region ProjectID PXDBString(30, IsUnicode = true, InputMask = "")] PXUIField(DisplayName = "Project ID")] public virtual string ProjectID { get; set; } public abstract class projectID : PX.Data.BQL.BqlString.Field<projectID> { } #endregion
#region ProjectName PXDBString(255, IsUnicode = true, InputMask = "")] PXUIField(DisplayName = "Project Name")] public virtual string ProjectName { get; set; } public abstract class projectName : PX.Data.BQL.BqlString.Field<projectName> { } #endregion
#region UserID PXDBInt()] PXUIField(DisplayName = "User ID")] public virtual int? UserID { get; set; } public abstract class userID : PX.Data.BQL.BqlInt.Field<userID> { } #endregion
#region UserName PXDBString(255, IsUnicode = true, InputMask = "")] PXUIField(DisplayName = "User Name")] public virtual string UserName { get; set; } public abstract class userName : PX.Data.BQL.BqlString.Field<userName> { } #endregion
#region DateAssigned PXDBDate()] PXUIField(DisplayName = "Date Assigned")] public virtual DateTime? DateAssigned { get; set; } public abstract class dateAssigned : PX.Data.BQL.BqlDateTime.Field<dateAssigned> { } #endregion
#region Cost PXDBBaseCury()] PXUIField(DisplayName = "Cost")] public virtual Decimal? Cost { get; set; } public abstract class cost : PX.Data.BQL.BqlDecimal.Field<cost> { } #endregion
#region Tax PXDBBaseCury()] PXUIField(DisplayName = "Tax")] public virtual Decimal? Tax { get; set; } public abstract class tax : PX.Data.BQL.BqlDecimal.Field<tax> { } #endregion
#region Amount PXDBBaseCury()] PXUIField(DisplayName = "Amount")] public virtual Decimal? Amount { get; set; } public abstract class amount : PX.Data.BQL.BqlDecimal.Field<amount> { } #endregion } }
Hi @aaghaei There are a couple of suggestions from my end. Please find the details below.
In your DAC, there are KEY fields (which may lead to duplicate records)
It seems the second Contact table join is incorrect.
I don’t think SQL View is required for this GI
I have re-created a GI, and Side-Panel is working fine. Please find the attached GI and screenshots for reference.
@Naveen Boga I truly appreciate the time you spent to make this work. I guess I had a brain fart as I had forgotten to set my DAC key fields. thank you for poiting the”KEY fields”.
I needed this sparkle. here is my revised DAC with key added and works now.
#region Keys public class PK : PrimaryKeyOf<UDCVEPApprovalPending>.By<module, docType, refNbr> { public static UDCVEPApprovalPending Find(PXGraph graph, string module, string docType, string refNbr) => FindBy(graph, module, docType, refNbr); } #endregion
Not sure what you see wrong in the joins. The way this query works if any document is pending approval, then I need the owner from EPApproval table (2nd contact join) and if document is on hold and no owner assigned in EPApproval, then I want the owner from document itself (1st contat join). It joined as it meant unless I am missing something. I will appreciate if you could expedite what do you see wrong.
I just had provided the first part of the UNION SELECT of my lenghty SQL view. currently in addition to “AP Bills” there are “Purchase Orders”, “Change Orders”, “Projects Budget”, and “Subcontracts” UNION select in this view and I have to add a few more. I wish we could have UNION GI in Acumatica. Can we?
Again I really really appreciate the time you spent and your advices that has been helpful as always.