Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [interface]

The tag has no usage guidance.

1
vote
2answers
50 views

Does Database.SaveResult, Database.DeleteResult, etc. implement a public interface?

The various DML operations (insert, update, delete, etc.) all return results with very similar methods and properties. It is not uncommon, as a developer, that I should want to handle these results ...
4
votes
2answers
85 views

Apex PMD: Avoid empty block statements

Perhaps this isn't the place for this -- but it looks like a good place to start. I'm using Apex PMD code analysis (within Visual Studio Code) and it's throwing off the following for an interface ...
0
votes
1answer
27 views

Global Inner Interfaces in managed package

We have an global interface inside a global class: global class SomeClass { global interface someInterface() { //various methods returning and accepting standard Apex objects only String ...
1
vote
2answers
60 views

Design pattern for an attachment trigger using trigger framework?

Hoping to tap into the wisdom of the Apex design pattern wizards out there. We have recently moved to a trigger framework in order to decouple and standardize our wildly disparate trigger code ...
4
votes
1answer
50 views

Versioning Apex Interfaces in managed packages

As documented in What are the pitfalls around Apex Interfaces in managed packages? a global Apex interface that has been published in a managed package can't be modified. Trying to do so results in ...
16
votes
1answer
253 views

Are Apex interfaces and abstract classes case-sensitive?

My understanding from the docs is that apex class and method names are case-insensitive. I've run across an edge-case with interfaces and abstract classes which appears to be undocumented behavior ...
4
votes
2answers
111 views

What are the risks or drawbacks of creating Parameterized Interfaces using of the Apex API version 25?

Unfortunately, as of API version 26, SFDC removed parameterized interfaces. However, it is relatively easy to create new interfaces and set the version as 25. So, to take the example from ...
0
votes
2answers
42 views

Is there a dictionary of SFDC native interfaces we can leverage in Apex code? [closed]

Interfaces are wonderful for creating reusable code, as well as enabling us to reuse or make better use of the functionality SFDC already provides us. The Apex Developer's Guide tells us how to ...
3
votes
1answer
504 views

Inner Classes/Interfaces

the guide says that one difference between Java and Apex is: Inner classes and interfaces can only be declared one level deep inside an outer class. Considering I know in Java what is an Inner class,...
2
votes
1answer
25 views

Can Interface declare only methods?

I have created the following interface and a class that implements it. global interface SampleInterface { String logicA(); } public class SampleClass implements SampleInterface { public ...
0
votes
0answers
32 views

Invoking AWS CLI from Apex class

I need to invoke AWS Command Line Interface from a apex class. Can someone please help me in that? Thanks.
2
votes
0answers
248 views

Global Interface in managed package

We are building a managed package and we have an understanding gap on the usage of Global Interface in the code. Couple of months back our package was rejected in the security review citing usage of ...
2
votes
0answers
59 views

Impossible to add “flexipage:availableForRecordHome” on a component

I'm trying to create a new lightning component that should be displayed on a record page. However the error I'm getting this error when I'm adding the interface Deployment Failed: ...
10
votes
1answer
276 views

How to deserialize into interface type when concrete type is unknown

As a follow up to this question: I am essentially trying to deserialize a JSON object into an Interface Type. Unfortunately we cannot deserialize using an Interface as the ApexType and must know ...
3
votes
2answers
325 views

Cannot deserialize JSON as abstract type?

While writing a class to help me manage @future jobs for a project, I stumbled onto an error message I can find very little help on. Cannot deserialize JSON as abstract type I used an interface ...
7
votes
1answer
960 views

Static method able to be called/executed from class instantiated from type.newInstance() with interface. Expected?

When trying to execute a static method from an instance of a class testMe tmp = New testMe(); tmp.myStaticMethod('a','b'); we get the familiar: Static method cannot be referenced from a non ...
11
votes
1answer
1k views

Are Lightning Interfaces (e.g. implements=“c:MyInterface”) actually useful for anything?

I've been trying to build a Lightning Community where I use component inheritance and interfaces to share certain bits of functionality. For my particular use, composition wouldn't fit as well as ...
4
votes
1answer
1k views

How Custom Iterators with Iterable Work

I was reading the topic of using iterator and iterabel Interface - https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_iterable.htm It says : If you do not want ...
2
votes
1answer
157 views

Programmatically list all public/global attributes on a lightning component

Salesforce has provided some new lightning component interfaces to make communities a bit more customizable. They have provided some documentation for these, but it is weak at best: https://...
0
votes
1answer
226 views

Using interfaces as parameter arguments

Is it possible to use interfaces as parameters within Apex? As an example: public interface InterfaceExample{ void example(InterfaceExample ex); // Will not compile InterfaceExample example2(...
6
votes
1answer
183 views

Doesn't Set<T> collection implement Iterable<T> interface? [duplicate]

I am trying to join String elements of Set with semicolon. Set<String> elements = new Set<String>{ 'foo', 'bar' }; System.debug(String.join(elements, ';')); getting the ...
1
vote
1answer
89 views

Clearing (or Cleaning) Global Search Cache - False Results - Sharing

How do we get Global Search to NOT show results that are NO LONGER VISIBLE to the logged in user? More quickly? Ever? I'm noticing as we test our implementation in Sandbox that when I login as ...
1
vote
0answers
36 views

Error: Managed interface that is released can't implement new interfaces (bug?)

I have a managed package with the following class already in it: global class MyInterfaceClass { global interface InnerInterface {} global interface DeepInterface extends InnerInterface {} } ...
1
vote
1answer
2k views

custom component not showing up in community builder

a custom lightning component I just created is not showing up in my community-community builder custom component list as an option to use. I have had this issue before but forget how to make it ...
0
votes
1answer
20 views

Designed schema and loaded data — is it possible to build an app that will just visualize this data from custom user requests?

Quick question -- I'm new to salesforce but I tried to dig around and want to 1) check if my understanding is correct and 2) see if something is possible. Basically, I have a schema that I built ...
0
votes
0answers
17 views

Menu items in Spanish while the rest of the interface is in English

How can I change the language of dropdown menu items? My interface's language is English but most dropdown menu items stubbornly cling to Spanish. For example, in Tasks the Priority dropdown menu ...
-1
votes
1answer
97 views

what is interface method in salesforce ? How Many types Of Interfaces Is ther In salesforce [duplicate]

what is interface? when using interface? In Salesforce Give Me Explination
2
votes
1answer
99 views

Using interfaces from managed package

We have a managed package. In the managed package, we have a button in the application. When the user clicks on the button, we want the customer's specific logic to be executed (which could ...
2
votes
1answer
64 views

Enable collapsible sections for partner users

I have "Enable Collapsible Sections" checked in the User Interface settings. However it currently only works for Users, not Partner Users. Is there a way to enable this for Partner Users too?
16
votes
4answers
5k views

Why use an interface in Apex?

I'm studying for my Platform Dev I exam, and I've been reading about interfaces. I understand how they work in abstraction, but what I don't understand is why you would use them. The documentation ...
5
votes
2answers
577 views

How to Create a Custom App Settings Page?

I would like to create a custom app package that provides the user with a setup interface in which they can input their own preferences, which inputs will then be referenced by apex code. I will be ...
16
votes
1answer
1k views

Abstract, Interface, Classes OH MY - Question on Approach

So I believe that I have a real world use case for an object model that uses abstract classes and interface. I do however have a few questions about the best way to go about it: Interface public ...
0
votes
1answer
135 views

extend a class that implement Messaging.InboundEmailHandler (email service)

I use to develop in java where i can extend a class that implement an interface. This way, the child-class implement the interface too and extends the overrided methods. I am trying to do the same ...
3
votes
3answers
263 views

How do you bring up the window showing Tasks?

There's a window that shows Tasks -- it may be called the "reminder window". It usually shows up when I log in, but somehow it got closed. How do you bring this window up? The Window I'll describe ...
3
votes
1answer
165 views

What are the pitfalls around Apex Interfaces in managed packages

I would like to add an interface to one of our managed packages. This interfaces would be implemented by custom code in a customer org where the package is installed. It would be called from a custom ...
4
votes
2answers
720 views

Can interface have inner classes or interfaces?

Can interface have inner classes or interfaces? Looks like it is not possible and the answer is no, however it is not mentioned anywhere in the documentation https://developer.salesforce.com/docs/...
2
votes
1answer
1k views

Must a class implementing a global interface also be global?

As stated in the title, when I implement a global interface, do I need to make the implementing class global, for example when implementing Schedulable or Database.Batchable<SObject>? global ...
2
votes
2answers
87 views

Base Class or Interface for Custom Settings

Is exist Interface or Base class for Custom setting? I tried use SObject class, but it does not support Custom Settings Methods. For any SObject we can use SObject class, that base class for standard ...
1
vote
2answers
76 views

ISV-internal interface between Base and Extension Package - Best Practises?

We are an ISV with multiple managed packages that build on each other. EXTENSION builds on data in BASE. We now want to start to add Apex code in EXTENSION that uses and enhances code in BASE. How ...
5
votes
2answers
871 views

One Class to control all Trigger. - Dispatcher

I'm having some problems when trying to make a number of classes and triggers to run on a dispatcher class. The components for this architecture are the following: One -TriggerDispatcher class. ...
6
votes
1answer
714 views

One Trigger to rule all!

I'm trying to make work a trigger architecture pattern that was designed by Adam Purkiss, I believe around 2012. I know that there are other more recent designs but I just want to try this one from ...
0
votes
1answer
382 views

Implementing Custom Interfaces similar to Comparable Interface

I've a list of wrapper objectsin my controller for which I need to perform some operation(say doLogic()). I want to use the method similar to calling sort method. listOfWrappers.doLogic(); //similar ...
5
votes
4answers
4k views

Interface with virtual keyword

Can anyone explain me how these two declaration differs from each other public virtual interface MyInterface { } and public interface MyInterface { } ? what this virtual keyword makes difference ...
0
votes
1answer
397 views

what is the difference b/w customer interface and user interface

Can any one let me know what is the difference b/w customer interface and user interface??one of our client has raised this question ,whether we can create a customer interface and application in ...
4
votes
2answers
1k views

Queueable interface in salesforce not allowed on inner class?

I am trying to implement new Queueable interface of Winter 15 to allow chaining. But on one of my orgs it gives error as Invalid interface name specified. While same works properly on second org. ...
4
votes
1answer
2k views

How to achieve Test Coverage for Interface Classes

I am using the trigger framework presented here, which uses several interfaces and utility classes: http://krishhari.wordpress.com/2013/07/22/an-architecture-framework-to-handle-triggers-in-the-force-...
3
votes
2answers
1k views

Visualforce reportchart - can we disable access to report behind it?

Using VF I have a nice inline chart - are there anyways to make the VF page 'unclickable' so that if a user clicks on it, it won't load the report behind the chart? So clicks on the chart do nothing? ...
9
votes
2answers
862 views

Parameterized Interfaces - what are they?

This is purely for academic purpose to understand how interfaces work I found many examples where you pass something while implementing an interface global class CustomIterable implements ...