Run a Javascript on page load

I am trying to run javascript, that will set a value in the controller on page load. However, I cannot seem to get it to run. Visual force page <apex:page controller="playGroundController" action="{!pageLoad}" standardStylesheets="false" docType="html-5.0" showHeader="false"> <header> <apex:form> <apex:actionFunction action="{!setSite}" name="setSite"> <apex:param name="param1" assignTo="{!site}" value="GC"/> </apex:actionFunction> <script type="javascript"> function run(){ console.log('hello') ....

Nathan Nathan: 8 hours ago


Create a clone of an opportunity

I'm trying to figure out how to create an opportunity page that will have the exact same fields as an old opportunity page except that it will have a different Id. That's it, only the ID should be different, the rest should all be the same. All the fields and ....

Maya Maya: 8 hours ago


Making SOAP Calls via SSJS

I am trying to make a SOAP call following from the answer here : Server-Side Javascript calling SOAP API ( I am running this on a cloud page. When I publish it, it doesnt render (harbinger or bad times) and when I try to visit the cloud page, I get ....

Maya Maya: 8 hours ago


Prevent APEX from Sending email copies to code developer

Hi Im sending emails using the following code: String[] toAddresses = new String[] {inquery.email__c}; Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); mail.setTargetObjectId(inquery.OwnerID); mail.setToAddresses(toAddresses); mail.setSenderDisplayName('Salesforce Support'); mail.setUseSignature(false); mail.setBccSender(false); mail.setSaveAsActivity(false); EmailTemplate et=; mail.setTemplateId(; Messaging.SendEmailResult [] r = Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail}); As the developer, I keep on receiving a copy of all the emails that ....

Naomi Naomi: 9 hours ago


Does the url value for MarkupBeginSegmentInput matter?

Given a ConnectApi.MarkupBeginSegmentInput with a markupType of ConnectApi.MarkupType.HYPERLINK, the url attribute is required as stated in the documentation: When working with it, I've realized that the url doesn't seem to matter. The value of the LinkSegmentInput or TextSegmentInput is what is rendered and used as the link. It seems ....

Gabriel Gabriel: 9 hours ago


Is it possible to do a "reverse regex" pattern match?

I have the following code: if(PATTERN_A.matcher(someValue).matches()){ model = MODEL_A; } else if(PATTERN_B.matcher(someValue).matches()){ model = MODEL_B; } else if(PATTERN_C.matcher(someValue).matches()){ model = MODEL_C; } else if(PATTERN_D.matcher(someValue).matches()){ model = MODEL_D; // etc... } else { throw new NoMatchException(); } This is very redundant and ugly. What I'd like is for code like this: ....

Beau Beau: 9 hours ago


Error on Package Installation - In field: object - no CustomObject named WorkFeedbackRequest > found

I have built an unmanaged package and was able to deploy it to several orgs. Unfortunately at the current Service Cloud org I get the following error: In field: object - no CustomObject named WorkFeedbackRequest found XX_Admin: In field: object - no CustomObject named WorkFeedbackRequest found XX_Admin is a permission ....

Isaac Isaac: 9 hours ago


modifying a record in the middle of an approval process

I need to modify a field for a record that is being approved. I unlocked the record, and made the change... now I need to re-lock the record. How do I re-lock it? I don't see a button on the top of the page... what happened, and what's the fix? ....

Leah Leah: 9 hours ago


Uploading to Custom Object then Matching Contact Object?

How do I import data (via csv file) into a custom object in SalesForce and then use identifying fields within the custom object (such as First Name, Last Name, location, etc) to "lookup" and subsequently fill in the SalesForce ID number? My goal is to relate the custom object's data ....

Aaron Aaron: 10 hours ago


Pardot SDK for python after Feb 15 login change

We are using Pardot SDK (package: Pypardot) to pull and update data from Pardot API (version 4). Since the authentication change was implemented, the SDK method of Pardot is not supported anymore and it means that we need to recreate our whole API calls from scratch. Is there any solution ....

Andrew Andrew: 10 hours ago