apex's questions - English 1answer

23.105 apex questions.

I have a slightly tricky situation in visualforce. I have a Forecast__c table, which contains field called District_Forecast__c. As the name suggests, this field contains revenue forecast at district-...

Can anyone tell me how to get the contentData and contentFileName for FeedComment ? I can get same for FeedItem using below query. [select Id,RelatedRecordId,Type,Body,CreatedDate,CreatedBy....

I'm trying to figure out the extent of C# that Apex uses in its own implementation of C#. Is there a good way to find this out instead of picking up a C# book on Barnes And Noble and going trial-by-...

I have the following information: Week Number, Week Day and Time in AM/PM as fields in an object. And, another field to indicate if these values are provided as per GMT or IST. In my apex code, I ...

Piechart Controller is public class DonutChartController { public List<PieWedgeData> getPieData() { Id userId = UserInfo.getUserId(); User loggedInUser = [Select Id, Email, ...

I have two objects named Covered product and proforma Invoice line. And I have a text field named BillingPN on both the objects and I want the field in proforma Invoice to be generated by the same ...

I want to send email alerts to user which are lookup with account (user field is lookup in account) at the start of every quarter, based on a picklist. My proposed picklist values, and their desired ...

sType.SupplierNameI have a VF component, which have two picklists which are populated after a callout from the JSON response. I am getting all the options displayed correctly , but when I select a ...

When iterating through fields in an object using the Schema methods, I can identify whether a field is a picklist. How do I tell if this field allows input of free text? For example, Task.Subject is ...

Text in Document object of salesforce are being saved in UTF-8 now, but I need to save it in OSI-8859-1/ANSI format. When I do the following, and try to download the document and look at its encoding ...

I have a community, in which I insert some files. When a file is inserted, it create a link that that can redirect to the file inserted. But I need it to redirect to the salesforce console (for ...

I am currently trying to call an Apex controller function from an apex:actionFunction, but I can't seem to get the parameters to be passed to the controller function. ActionFunction <apex:...

I have two VF pages i need to pass value from my 1 st VF input field to 2nd VF page using common custom controller. this is My Apex Code; public class Sample{ public Sample(ApexPages....

How do I use the json2apex tool. I generated an apex code and I am trying to split this in an apex class and testclass but get the error: Method does not exist or incorrect signature: void parse(...

Text in Document object of salesforce are being saved in UTF-8 now, but I need to save it in ISO-8859-1/ANSI format. When I do the following, and try to download the document and look at it's ...

i want to search a text in Rich Text area field in a custom object. As We can't use the RichTextArea field in where clause to search records,i am looking for the way to search a text. Is there any ...

I am getting the below error when running my test class and I am not sure why. With the debugging log it says that my controller is null. So when I do Controller.Save() it throws the error. public ...

here is my code: public class AddPriceModalController { @AuraEnabled public static List<String> getRegionValues() { List<String> lstGeography = new List<String>(); //...

I want to test the AggregateResult in my class. if the result of AggregateResult instance is greater than 0 then controller enter the loop. How should i mock the AggregateResult object in my test ...

If needed I will post the code (but am unsure how much that will help at this stage). Basic background, this has been working for some time, and recently, stopped worked. I have a button that fires ...

I am able to generate QR code for some object fields and values are displayed as per procedure while scanning QR code using mobile App.But i need to fetch values from QR code by scanning and need to ...

I want to make a trigger to update my custom object Term_of_Payment__c amount field. Term of Payment Amount = Opportunity Amount / Interval (picklist type on opportunity) This is what i`ve tried so ...

VF page displays the records using page block table. I'm updating the records from VF page by clicking on "Save" Button. I've used standard Jquery pagination to implement the pagination. When I am ...

I need a quick approach to something like: MyClass mc = new MyClass(); String theName = ClassNameProvider.getName(mc); // returns 'MyClass'

I want to sort Accounts using the field in Opportunity in my SOQL. This is the query which selects Accounts and Opportunities. I want to order the Accounts using MAX of Opportunity.ExpectedRevenue ...

I am dealing with some huge data and while querying I need to by pass many of them. So I am keeping ID in one List and passing them in the SOQL. Example: List<Id> idlist = new List<Id>();...

I have a custom page to preview and render Email templates, now i came across that some (not many) templates will exceed the view state of the page ( max 137kb) As I need the function to replace text ...

Is there any way to retrieve the "Grant Access Using Hierarchies" setting programmatically (i.e. through Metadata, SOQL, or other means)? I am referring to the checkbox next to each object under ...

I want to place leads and contacts within a Map so that I can access them on a visualforce page using a repeat component. Unfortunately I cannot access the Account values from the Contact object when ...

I have three options to insert credits. Credit option 1 Credit option 2 Credit option 3 User must always have at least one credit option but can add up to 3. The picklist options for each credit ...

I want to create pop up which will open if you click on a text box. On pop if I put any value and once click on save the same value should be populated on parent page according to option selected in ...

I have created four contacts for an account. I want to update child records of an account.If I update lastname in first record of my contacts to 'AAAA' then the lastname for the remaining three ...

I have two objects, Financial_Account and Client; they are connected with master-detail relationships to Client_Financial_Account_Relationship object. In a trigger on 'Financial_Account' I want to ...

Why am I getting the error: List has no rows for assignment to SObject? Here is the function which produces the error: @AuraEnabled public static void setCharacterPose( String ...

Can I check whether a field is available on any of the page layout of an object using code? I have to set a checkbox if the field is available.

How is lightning:input designed to be used? Is it supposed to support field references? All the examples show value=string literals. With something like <lightning:input value="{!v.contact.Name}"...

I have a Visualforce page that is opened with custom action from the opportunity screen. We are using the Lightning Experience so this page is opened as a pop-up window. The pop-up window width is too ...

I'm working on an application made up of Lightning Components on Community pages. The application has a date field that is allowing various values into it and it's not capturing data correctly on the ...

Can somebody explain wjat is the reason of such an exception during execution Apex Job

I am using the EmailManager provided in Trailhead and I am writing a test class and it works as expected (and I get over 75% coverage) but I can't seem to get it to 100% coverage because of the ...

Try, try, catch, catch

1 answers, 547 views apex exception
Given the following code, what does the developer expect will cause block C to execute: try{ try{ //code block A }catch{ //code block B } }catch{ //code block C }

Please find the below trigger handler which is not passing PMD rules. Error 1."Deeply nested if..then statements are hard to read" for following class: Public Class LeadTriggerHandler { //Set ...

I tried to write a JSON callout which would send a request using the post method. This is the first time I write something of this type, so most I have achieved with the help of posts in this forum ...

I would like my Apex code to know the difference between me being actually logged in as a particular Salesforce user, versus being logged in as an administrator and impersonating the user (because I ...

I am trying to call a VF page from another VF page which use the same controller. I am getting the error when i click on the command button which calls the pagereference method and redirects to the ...

Using the below function for example to set an OrderItemList and then referencing that through visualforce with <apex:outputField value="{!o.Product2.Family}" /> only works with oi.Product2 = ...

In a trigger I am trying to update values of child records which are pulled from a perent record. I can see the updated data in the debug statements but the actual records are not getting updated. ...

in an apex future method launched by a trigger I am using SingleEmailMessage to send email messages to specific email addresses, using a Lightning EmailTemplate, following almost the same approach ...

I'm on the advanced apex super badge step 7, and before this I thought I had a good understanding of order/orderItem/pricebookEntry/product2/pricebook2 objects. However, upon creating my own ...

I am using the below code to get the HMAC SHA 256. But signature debug is not getting printed. public void genrateSignature() { String salt = String.valueOf(Crypto.getRandomInteger()); String ...

Related tags

Hot questions

Language

Popular Tags