apex

Send (Load) a URL to web browser and run it in background in APEX

安稳与你 提交于 2019-12-12 06:04:22
问题 Does Apex/Visualforce allow a URL which is stored as string in apex and run it in web browser in background. Actually, that url is returned from a Docusign RestAPI callout for posting the envelope into "correction" status. The Envelope correction Status is not activated until i manually paste the url (link) in to a web browser and run it. Does anyone know how to run a url programatically in a web browser through Apex/Visualforce in background ? (or) Is there anyway that i could activate the

Salesforce Apex: test that callout hasn't been made

二次信任 提交于 2019-12-12 05:13:12
问题 I want to write a unit test that checks that callout hasn't been made from the trigger. I know how to test if the callout is made correctly - by implementing HttpCalloutMock: global class MyHttpCalloutMock implements HttpCalloutMock { global HTTPResponse respond(HTTPRequest req) { //test HTTPRequest here } } But if no HTTP request is made, then the respond() method won't be called. So this approach doesn't test if the request was made at all. I need something like this: HTTPRequest

Google Drive API message “Daily Limit for Unauthenticated Use Exceeded.” while viewing files from Salesforce

不想你离开。 提交于 2019-12-12 03:43:52
问题 I created a service account, got json configuration file and I request an access token using it. The response is ok, I receive token. When I upload file using it everything is ok, but when I try to view files from a folder it returns error message Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup. My service account only needs to access own files, it doesn't access files of any other users. My code for viewing files (right now I try to debug the response): public

Apex Class Controller Random Contact Records

删除回忆录丶 提交于 2019-12-12 02:53:21
问题 I am looking on selecting a small group of random contacts from a specific view. The records are in that view if their campaign status is set to sent. I have created an apex class that I think would work, however I am trying make this class a controller and build a visual force page. I am knew to salesforce and apex. After doing some research i think i will have to use getters and setters to call the information. My apex class is public class MyController { Integer count = [SELECT COUNT()

Fuzzy Logic / matching on Company Name (leads)

六月ゝ 毕业季﹏ 提交于 2019-12-11 06:48:12
问题 I have looked at conventional methods of using De-Duping tools however because I work for an organisation which is multi alliance the de-duping tool looks at the entire database, when I actually need to look at segments of the database, so I have decided to try and create my own de-duping tool. So far I have created the following apex . The apex currently looks at the company name on the lead and if there is an exact match with another company name in the database it provide the user the

Issue using RSA encryption in javascript

你。 提交于 2019-12-10 12:04:37
问题 I'm working with a project that currently is doing encryption in a salesforce apex class (using the Crypto library) and that logic needs to be moved into a javascript file. The node.js package I'm trying to use to do the encryption is node-rsa. Here's the code that currently exists in apex: String algName = 'RSA'; blob signature; String signGen = ''; String pKey = 'MIIEvgIBADANBgkqhkiG<rest of key snipped>'; String payload = 'some payload'; blob privateKey = EncodingUtil.base64Decode(pKey);

Finding the ID of a Salesforce Global Value Set

半世苍凉 提交于 2019-12-10 11:59:52
问题 I'm attempting to write an APEX class that will add items to a global valueset, but in order to do so I need to know the ID of the global value set. Is there a way to find the ID of the global valueset (through APEX, not by looking at the URL) that a picklist field is using? Ideally I'd be able to do something similar to: Case.picklistField__c.getdescribe(); and get a response that includes the ID of the global value set that it uses - that way I can then use my the metadataAPI to update the

Salesforce 面试题

喜欢而已 提交于 2019-12-04 08:50:28
问:两个User可以具有相同的Profile(简档)吗?可以将两个Profile (简档) 分配给听一个User吗? 答:一个Profile可以分配给任意数量的User,但一个User只能拥有一个Profile。 问:什么是Salesforce的Governor Limits? 答:Governor Limits控制着您可以在共享数据库中存储多少数据或多少记录。 问:什么是Sandbox(沙盒 ) 组织?Salesforce中 Sandbox (沙盒)有哪些不同类型? 答:Sandbox(沙盒) 是Production(生产环境)/组织的副本,用于测试和开发目的。 它允许在不影响生产环境的情况下进行Apex编程开发。 沙箱的类型为: Developer(开发者) Developer Pro(开发人员专业版) Partial Copy(部分复制) Full(完整) 问:您可以在Production(生产环境)中编辑Trigger(触发器)/Apex吗?您可以在Production(生产环境)中编辑Visualforce Page吗? 答:不可以在生产编辑Trigger和Apex,但可以在生产编辑Visualforce Page。 问:标准的字段Name,可以具有哪些不同的数据类型? 答:Auto Number(自动编号):为了生成自动编号,需要在定义字段时指定格式

Creating a test class for a Select Statement

*爱你&永不变心* 提交于 2019-12-04 06:20:40
问题 I was wondering if you could help me. I am strugging to create a test class for the code below. Any help would be appreciated. Many thanks public class MatchReadyImage { public Match_Day_Check_List__c obj {get; set; } public MatchReadyImage(){ obj = [ Select Id, Match_Day_Ready_Status__c From Match_Day_Check_List__c Where Name = 'Everton V West Ham United Goodison Park EPL 2013-05-12' ]; } } 回答1: You just need to create a test data which will be selected by your code, because the data from

How to Access APEX_ITEM.TEXTAREA Field Using APEX_APPLICATION.G_F01

匿名 (未验证) 提交于 2019-12-03 08:57:35
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have the following tabular report using the following query: select id, name, telephone, apex_item.checkbox2(1,id) as "Tick when Contacted", apex_item.text(20,my_date) as "Date Contacted", apex_item.textarea(30,my_comment,5,80) as "Comment" from my_table This report displays 10 records where the driving key is the checkbox assigned to F01. My problem is, as this is a tabular report, using Oracle APEX_APPLICATION.G_F01.COUNT - how can I access the values of the textarea field, where "my_comment" is a user enterable value on the report and