How to remove filtering on an edit page

Case

I cannot select an opportunity in the [Activity] section if the [Account] and [Contact]] fields are populated. If the [Account] and [Opportunity] columns are populated, adding a contact erases the opportunity.

Solution

Remove filtering by the [Contact]-[Opportunity] columns (most customers assign opportunities to accounts).

  1. Replace the ActivityPageV2 activity page
  2. Add the following code to the replaced schema:
define("ActivityPageV2", ["BusinessRuleModule"],
    function(BusinessRuleModule) {
        return {
            entitySchemaName: "Activity",
            rules: {
                "Opportunity": {
                    "FiltrationOpportunityByContact": {
                        "ruleType": BusinessRuleModule.enums.RuleType.DISABLED
                    }
                }
            },
            details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
            diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
        };
});

 

Like 0

Like

Share

0 comments
Show all comments