You are here:
Update Additional Components for Funding Workbench
Set up additional components for enabling and accessing the capabilities of Funding Workbench.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions. |
-
Clone and update flexcards for Document Checklist Items on an Application Action
Item.
- From App Launcher, search for and select Flexcards.
- Open the FundingWorkbenchDocumentItemForApplicationActionItem flexcard and click Clone.
- Enter a name and save your changes.
- Select the first cell in the first column in the flexcard and delete it.
- From the elements panel, drag and drop an Action element in its place.
- In the properties panel, enter a name and label and select Show label without the icon.
- Enter an Action label.
- For Action Type, select Navigate.
- For Target, select Record.
- For Object API Name, enter DocumentChecklistItem.
- For Target Action, select View.
- Save and activate the flexcard.
- Similarly, clone the FundingWorkbenchDocumentsForApplicationActionItem flexcard.
- Replace the child FundingWorkbenchDocumentItemForApplicationActionItem flexcard with your new flexcard cloned and updated in the steps above.
-
Add the cloned flexcards to the Application Action Item record page.
- From App Launcher, search for and select Application Action Items.
- Open a record page, from setup click Edit Page.
- Replace the FundingWorkbenchDocumentItemForApplicationActionItem flexcard on the related tab with your updated flexcard from step 1h.
- Activate your flexcard and under App, Record Type, and Profile, select Assign to Apps, Record Types, and Profiles.
- Select Funding Workbench Console.
- Click Next until the Profiles section.
- Select the required users.
- Click Next and save your changes.
-
Update the FundingWorkbenchActionItemCreation Omniscript.
- From App Launcher, search for and select Omniscripts.
- Open the FundingWorkbenchActionItemCreation Omniscript and click New Version.
- Replace the label of the first Step element with $standardLabel.FundingWorkbenchActionItemCreation.Step1Header.
- Replace the label of the first Step element with $standardLabel.FundingWorkbenchActionItemCreation.Step2Header.
-
Create an apex class.
- In Setup, in the Quick Find box, enter Apex Classes, and then select Apex Classes.
- Click New.
-
Enter the Apex Class as provided.
global class FundingWorkbenchApexUtil implements System.Callable { // Minimal constants needed for this method + error reporting private static final String RESULT_KEY = 'result'; private static final String SIZE_KEY = 'size'; private static final String FOUND_KEY = 'found'; private static final String APEX_INVOCATION_ERROR = 'ApexInvocationErrorDetails'; global FundingWorkbenchApexUtil() {} // --- REQUIRED by System.Callable pattern used in the original --- global static Object call(String action, Map<String, Object> args) { Map<String, Object> input = (Map<String, Object>) args.get('input'); Map<String, Object> output = (Map<String, Object>) args.get('output'); return invokeMethod(action, input, output); } // --- Minimal dispatcher: keep only what's needed --- public static Object invokeMethod(String methodName, Map<String, Object> input, Map<String, Object> output) { String errorDetails; try { switch on methodName { when 'formatAssociatedParties' { return formatAssociatedParties(input, output); } when else { errorDetails = 'Invalid methodname'; } } } catch (Exception ex) { errorDetails = 'Error Occurred : ' + ex.getMessage(); } if (errorDetails != null) { output.put(APEX_INVOCATION_ERROR, errorDetails); } return output; } /** * Normalizes AssociatedParties into: * [{ "label": "...", "value": "..." }, ...] * * Supports: * 1) List<Object> of Map<String,Object> with keys label/value * 2) String like: * "[{label=Application General, value=13Z...},[{label=Rachel, value=0x...}, {label=Mike, value=0x...}]]" */ private static Object formatAssociatedParties(Map<String, Object> input, Map<String, Object> output) { List<Map<String, Object>> result = new List<Map<String, Object>>(); Object raw = (input == null) ? null : input.get('AssociatedParties'); if (raw == null) { output.put(RESULT_KEY, result); output.put(SIZE_KEY, 0); output.put(FOUND_KEY, false); return null; } // Case 1: Already list of objects if (raw instanceof List<Object>) { for (Object o : (List<Object>) raw) { if (o == null) continue; if (o instanceof Map<String, Object>) { Map<String, Object> row = (Map<String, Object>) o; String label = String.valueOf(row.get('label')); String value = String.valueOf(row.get('value')); if (!String.isBlank(label) && !String.isBlank(value)) { result.add(new Map<String, Object>{ 'label' => label, 'value' => value }); } } } } // Case 2: String (may be nested / have spaces) else if (raw instanceof String) { String s = ((String) raw).trim(); if (!String.isBlank(s)) { // Extract every label/value pair anywhere in the string. Pattern p = Pattern.compile( 'label\\s*=\\s*([^,\\]\\}]+)\\s*,\\s*value\\s*=\\s*([^\\]\\}\\,\\s]+)' ); Matcher m = p.matcher(s); while (m.find()) { String label = m.group(1).trim(); String value = m.group(2).trim(); // strip any trailing brackets that sneak into the last token while (value.endsWith(']')) { value = value.left(value.length() - 1).trim(); } if (!String.isBlank(label) && !String.isBlank(value)) { result.add(new Map<String, Object>{ 'label' => label, 'value' => value }); } } } } output.put(RESULT_KEY, result); output.put(SIZE_KEY, result.size()); output.put(FOUND_KEY, !result.isEmpty()); return null; } } - Save your changes.
-
Update the FundingWorkbenchGetDocumentCategoryAndType integration procedure with the
created apex class.
- From the App Launcher, find and select Integration Procedures.
- Open FundingWorkbenchGetDocumentCategoryAndType.
- From the dropdown, click Create Version.
- For the Remote, Remote1, and Remote2 remote action elements, in the properties panel, for Remote Class, enter FundingWorkbenchApexUtil.
- For the SetAssociatedParties, SetAssociatedParties1, and SetAssociatedParties2 set values action elements, in the properties panel, set the element value as [%DataMapperExtract:ApplicationFormProduct%,%DataMapperExtract:PartyProfiles%], [%DataMapperExtract1:ApplicationFormProduct%,%DataMapperExtract1:PartyProfiles%], and [%DataMapperExtract2:ApplicationFormProduct%,%DataMapperExtract2:PartyProfiles%] respectively.
- Save and activate your changes.
-
Update the FundingWorkbenchDocumentDetailsSelection flexcard.
- From the App Launcher, find and select Flexcards.
- Open the FundingWorkbenchDocumentDetailsSelection flexcard and click Clone.
- Enter a name and save your changes.
- For the "Select the document category" input element, in the Actions panel, select the getDocTypes action.
- Update the Integration Procedure Name to FundingWorkbenchGetDocumentCategoryAndType.
- Save and activate your changes.
-
Update the FundingWorkbenchDocumentUpload flexcard.
- From App Launcher, search for and select Omniscripts.
- Open the FundingWorkbenchDocumentUpload Omniscript and click New Version.
- In the UploadFileStep, update the flexcard name to the name of the newly cloned and updated flexcard from step 6.
-
In the SetSelectedValues step, for the
SelectedDocumentTypeId element, update the
Expression as follows.
IF(%UploadFileStep:SelectDocumentCategoryAndType:DocumentInformation:selectedDocumentTypeId% == NULL, %documentTypeValue%, %UploadFileStep:SelectDocumentCategoryAndType:DocumentInformation:selectedDocumentTypeId%)
Note In case the Funding Workbench app isn't visible in your org, please check this
known issue.
Did this article solve your issue?
Let us know so we can improve!

