Hot answers tagged

7

It seems that you want to remove elements "Closed Won" and "Closed Lost" from the list. You can do it by the below code. pickListValuesList.remove(pickListValuesList.indexOf('Closed Won')); pickListValuesList.remove(pickListValuesList.indexOf('Closed Lost')); Since "splice" is not a function for apex lists. You can find all the functions supported by apex ...


5

24 hours as per docs for Org Cache. No mention for session cache, probably because the session can expire any time?


3

To deploy: Your trigger must be exercised by a testmethod Your @future class need not be exercised by a testmethod in order to deploy provided that you have at least 75% coverage across all Apex You can specify which tests to run when you deploy. You do not need to run all tests That said, it is "developer negligence" to not write testmethods for each ...


3

I would code that like this: public PageReference applyTarget() { String url; switch on selectedTarget { when 'COLLECTION TARGET' { url = '/apex/CollectionTargetSettingInit'; } when 'SIGNED REVENUE TARGET' { url = '/apex/SignedRevenueTargetPeriodSetting'; } when 'NETWORK TARGET' { ...


3

Change the class signature: public with sharing class APTS_UsageInput_InsertTempRecordsBatch implements Database.Batchable<APTS_UsageInputWrapper> Make sure you consistently apply "generics" in your Batchable implementation, as covered in the documentation: public Iterable<APTS_UsageInputWrapper> start(Database.BatchableContext context) and:...


2

I'd use the rendered attribute to show either an input or output field: <apex:inputField rendered="{!isEditAllowed}" value="{!pro.Total_units_ordered__c}" style="width:50px" id="inputToDisable" /> <apex:outputField rendered="{!NOT(isEditAllowed)}" value="{!pro.Total_units_ordered__c}" style="width:50px" id="inputToDisable" /> This will work for ...


1

I think I found the problem. I found that order has a Pricebook2Id field that need to be populate to create OrderItem records linked to it.


Only top voted, non community-wiki answers of a minimum length are eligible