Notifications
Announcements
No record found.
Hi Guys,
I want to add a new switch case in this method getColumnFilterTableFieldMappingForRowElement from this class BudgetPlanLineFieldFilterMapping. So I added a new switch case in that method using Chain of Command. After my code was executed it keeps executing the default case in that method. I don't know how to prevent that. please help me out here.
You can't prevent it.
But, you can create an extensibility request for Microsoft in Lifecycle Services. There's a request type just for these cases (default case which throws an error).
docs.microsoft.com/.../extensibility-requests
However in this particular case you can work around the issue in your code. You can use this workaround until Microsoft hopefully reacts to your extensibility request and changes the standard code.
Something like this:
public static container getColumnFilterTableFieldMappingForRowElement(FieldName _fieldName){ container retCustom; container retStandard; FieldName fieldNameLocal; if (_fieldName == fieldStr(BudgetPlanLine, MyCustomField)) { fieldNameLocal = fieldStr(BudgetPlanLine, Comment); // Use just something that doesn't cause exception retCustom = [tableStr(BudgetPlanLine), fieldStr(BudgetPlanLine, MyCustomField)]; } else { fieldNameLocal = _fieldName; } retStandard = next getColumnFilterTableFieldMappingForRowElement(fieldNameLocal); if (conLen(retCustom) > 0) { return retCustom; } return retStandard;}
public static container getColumnFilterTableFieldMappingForRowElement(FieldName _fieldName){ container retCustom; container retStandard; FieldName fieldNameLocal;
if (_fieldName == fieldStr(BudgetPlanLine, MyCustomField)) { fieldNameLocal = fieldStr(BudgetPlanLine, Comment); // Use just something that doesn't cause exception retCustom = [tableStr(BudgetPlanLine), fieldStr(BudgetPlanLine, MyCustomField)]; } else { fieldNameLocal = _fieldName; } retStandard = next getColumnFilterTableFieldMappingForRowElement(fieldNameLocal);
if (conLen(retCustom) > 0) { return retCustom; } return retStandard;}
Hi Nikolaos,
It's working fine now, thank you very much.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 646 Most Valuable Professional
André Arnaud de Cal... 529 Super User 2025 Season 2
Sohaib Cheema 285 User Group Leader