When selecting a customer on the Case screen. How can the system automatically add previous historical Cases of the same customer on the "RELATED CASES" TAB ?
Hi Team,
We would like to implement the following feature.
When entering a customer on the Case screen => If that customer has had previous Cases => the system automatically add previous historical Cases of the same customer on the "RELATED CASES" TAB and those historical cases are arranged in CreatedDateTime of Cases.
I created Event RowInserted but haven't achieved results yet. Please advise how to do this.
This would be beyond my programming knowledge but you could use a Sidepanel action on the screen to show this information. Just a suggestion which you may have already considered
I agree with @dcomerford to go for a side panel instead of customization in this case.
Hi @dcomerford , @ChandraM
Please guide me in detail how to do it
Best Regatrds,
NNT
@nhatnghetinh
Create a GI to show Case details or use the existing one it must be visilbe on the UI. Ensure the Business Account is on it as you will need that for the filter
Add an Action to the Case Screen in a customisation package as follows and publish
Open Case screen and you will see it to the RHS (by creating your own GI you can decide which fields you want to see etc.
When selecting a customer on the Case screen and the Case has not been saved, the Side panel does not display the information.
How when selecting a customer on the Case screen and not saving the Case => Side panel still displays information ?
Best Regards,
NNT
@nhatnghetinh Correct the record has to be saved for the side panel to work
Hi @nhatnghetinh Here is the Customization package built for you with the side panels solution. The version used is Acumatica 2023R1 build 105
Result:
Hi @dcomerford , @ChandraM
How to exclude current Case from Side panel list?
Best Regards,
NNT
Hi @nhatnghetinh A conditional logic cannot be added to the side panel. only Parameter Value can be passed to the side panel.
I think this could be adjusted in a generic Inquiry. You could have a new Generic Inquiry with a Parameter “CaseID” to show all the Cases except the one shown in the Parameter.
Hi @nhatnghetinh,
To display all case from the customer in the Related Case, you can redefine the CaseRefs view of the graph extension like below, where you select cases from the Customer
public class CRCaseMaint_Extension : PXGraphExtension<PX.Objects.CR.CRCaseMaint> { #region Event Handlers
PXViewName(Messages.CaseReferences)] public PXSelect<CRCase, Where<CRCase.customerID, Equal<Current<CRCase.customerID>>>> CaseRefs; #endregion }
Then you need update the DataField value of the each field in the grid to display the column(from CRCase DAC) value as required. Below is an example,
Like above I set the DataField for Subject and Status, below is the outcome,
I have attached the customization package for reference. Happy Customizing Acumatica.!!
Thank you very much for the solution to my question. I have tested this customization but there is a problem that we can not add new row to TAB “RELATED CASES” with any Case like the previous existing feature.
My wish for this feature is that the system automatically adds Cases with the same customer, but we can still add new rows or remove rows that the system automatically adds.
Best Regards,
NNT
Hi @nhatnghetinh,
Glad that helped.!
To be able to add the cases on the go, in the CRCaseMaint extension you can try override the caseRefs Data Handler to match your requirement.
protected virtual IEnumerable caseRefs() { var currentCaseCd = Case.Current.With(_ => _.CaseCD); if (currentCaseCd == null) yield break;
var ht = new HybridDictionary(); foreach (CRCaseReference item in PXSelect<CRCaseReference, Where<CRCaseReference.parentCaseCD, Equal<Required<CRCaseReference.parentCaseCD>>>>. Select(this, currentCaseCd)) { var childCaseCd = item.ChildCaseCD ?? string.Empty; if (ht.Contains(childCaseCd)) continue;
ht.Add(childCaseCd, item); var relCase = SelectCase(childCaseCd); if (relCase == null) continue;