apex

visualforce javascript remoting doesn't work properly

落花浮王杯 提交于 2020-01-05 08:11:52
问题 I'm trying to create some html elements as a reponse to a button click in my visualforce page, and i am using javascript remoting, but no matter what i do the page keeps refreshing after the button click. my visualforce page: <apex:page Controller="BpmIcountPayment"> <head> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1

How to get SMS request via twilio

Deadly 提交于 2019-12-24 23:06:52
问题 I have a class that can access the site url in the salesforce. The site url "https://somesalesforce.com/smsToApex" and same as the twilio account sms URL but this class can't called. I have reference this document.The twilio SMS url correct are not how to check?The Twilio account SMS url and salesforce site url are same as of now.Whenever SMS is came via twilio then automatically Case is createin the sandbox.But here not happened.I doing correct producer are not?.Can someone please help me

Connecting Unrelated Objects during Apex Trigger

走远了吗. 提交于 2019-12-24 19:33:21
问题 I am trying to create a trigger that does the following: Once an Account has been created, create an unrelated record (called a "Portal Content" record) that bears the same name, assuming the default RecordTypeId Take the ID of the newly created "Portal Content" record, and insert it into a lookup field on the originally created Account Add the ID of the original Account, and enter it into a field of the newly created "Portal Content" record Steps 1 and 2 were addressed in post Populate

Apex: Get user input and then send this input to external API that returns output as JSON - Salesforce

南楼画角 提交于 2019-12-24 19:29:01
问题 I wish to create an apex code in Salesforce that take input from users and then these inputs will be sent to an external API (this API will convert the input to JSON format). 1) User will input a sentence 2) Send it to external API and it will process the input to JSON file 3) retrieve JSON file 4) deserialize the JSON file - COMPLETED Is there anyone who has exprience in using Salesforce apex coding? My page is as below: <apex:page id="page" controller="calloutViewer_Controller" > <apex:form

Salesforce - Apex - query accounts based on Activity History

不羁的心 提交于 2019-12-24 04:18:15
问题 Hey Salesforce experts, I have a question on query account information efficiently. I would like to query accounts based on the updates in an activityHistory object. The problem I'm getting is that all the accounts are being retrieved no matter if there's "complete" activeHistory or not. So, Is there a way I can write this query to retrieve only accounts with activeHistory that has status="complete" and Type_for_reporting='QRC'? List<Account> AccountsWithActivityHistories = [ SELECT Id ,Name

Unable to Receive the SMS via twilio

♀尐吖头ヾ 提交于 2019-12-19 04:21:46
问题 I have twilio phone number,Visual force page and Controller.I have reference Document I have followed.I send an sms via twilio but unable to receive the sms. Customer Send an sms to twilio number it can revert back the sms but unable to receive the sms details in Salesforce Apex Visual force page <apex:page controller="TwilioRequestControllerContacts" action="{!init}" showHeader="false" sidebar="false"> <center> <apex:pageBlock title="Twilio Request Listener"></apex:pageBlock> </center> <

test class for inserting contacts through the following class

我们两清 提交于 2019-12-16 18:04:37
问题 I have one apex class which inserts the contacts.i wrote one test class for that where its is passing but the code coverage is zero.can somebody suggest what i missed? test class: @isTest public class TestReferalAccessclass { static testMethod void ReferalAccessclassMethod() { Test.StartTest(); Contact c=new Contact(FirstName='fname',LastName = 'lname',Email = 'email@gmail.com',Phone = '9743800309'); insert c; System.AssertNotEquals(Null, c.Id); Test.StopTest(); } } apex class: public without

Define Apex controller in javascript home component

孤街醉人 提交于 2019-12-14 02:33:03
问题 I have created a custom object Code_Postal__c . The goal is to check into my Code_Postal__c record the city's name with the same ZipCode set by the user on an Account record page. I don't need, and don't want to create a custom visualforce page. The fun fact is that my field is pre-populate with the good values but the research doesn't work. When I inspected my page to check why my autocomplete doesn't work I got the error below: **Uncaught ReferenceError: AutoCompleteController is not

Populate Lookup Field with Record Created From Trigger

血红的双手。 提交于 2019-12-13 17:29:25
问题 I am trying to create a trigger that does the following: Once an Account has been created, create an unrelated record (called a "Portal Content" record) that bears the same name, assuming the default RecordTypeId Take the ID of the newly created "Portal Content" record, and insert it into a lookup field on the originally created Account My current code does item 1 successfully, but when I added new code to complete item 2, I received the following error: Line: 6, Column: 1 System.DmlException

apex addError - remove default error message

这一生的挚爱 提交于 2019-12-13 03:54:11
问题 I have added addError to my record like in the following. v.addError('My Error message'); But I get the error message like in the following. I don't want the default part "Error: Invalid Data. Review all error messages to correct your data". I tried adding to some field instead of adding it to the whole record. But in this case, it implies that the error is specific to what the user has entered in that field. But this is not what I want. My error is record specific. In a nutshell, based on