32 votes
Accepted

Lightning App - getting URL parameter

In lightning whatever attribute you define can be passed as a query parameter . Lets take a look with sample example <aura:application> <aura:attribute name="whom" type="String" default="...
Mohith Shrivastava's user avatar
14 votes
Accepted

String Value of ID returns more than ID

You're calling String.valueOf() on the Event Sobject itself, not the Id string. As written, your first line should be: EventIdString = String.valueOf( [select id from Event where Id=: (ApexPages....
Christian Carter's user avatar
9 votes

String Value of ID returns more than ID

Technically, since you're passing the value as a String already, you probably don't need to query the value at all: TM.Meeting__c = ApexPages.currentPage().getParameters().get('EventId'); However, ...
sfdcfox's user avatar
  • 487k
8 votes

Lightning App - getting URL parameter

Just adding this answer for completion of the thread with the latest release. After Summer 18 release (API version 43 and up) we can utilise lightning:isUrlAddressable interface. Implement lightning:...
Ranga's user avatar
  • 1,722
8 votes
Accepted

How to deal with an optional field in Lightning URL hack?

After more googling, it looked as if URLFOR expressions were also valid for use in Lightning URL hacks. That opened up a whole new set of potential solutions. After much experimentation, I came upon ...
Sander de Jong's user avatar
7 votes

URL To A Record - Specify A Different Page Layout

You basically have three options: Change the RecordType of the record in question. Change the Profile of the running User Implement a Visualforce override Likely, only door number 3 is viable here. ...
Adrian Larson's user avatar
  • 150k
7 votes
Accepted

Replace ID with API Name

I believe the only way to to it would be to use a VF page as the Link and use an action method to navigate to the report. In the VF page controller query for the report by name: <page name="...
Eric's user avatar
  • 54.1k
5 votes
Accepted

URL Hack working for some fields but not others. Why?

You are missing CF prefix for the user field.. hope this will work /a07/e?RecordType=012w0000000iaZ9&nooverride=1&CF00N20000003NRbz= {!Account.Name}&CF00N20000002kMy5_lkid={!Contact.Id}&...
Vamsi Krishna Gosu's user avatar
5 votes

Lightning URL hack issue with prepopulating fields on Page Load

First you create a lightning Application name myFirstApp which retrieve data from the url. if your URl is like this /c/ChooseCampaignApp.app?AccountId=001P000000eM5z7&ContactId=003P000000hlONG ...
Piyush Kumar's user avatar
4 votes

Lightning URL hack issue with prepopulating fields on Page Load

Option 1 If possible, you may consider reverting back to Salesforce Classic until (or if) Lightning Experience supports your needed features. It's not a complete product yet but is getting new ...
Doug Ayers's user avatar
  • 4,166
4 votes
Accepted

Error - Failed To Execute Flow - 301 Prefix - Process Builder

The URL format for going to a Flow is: https://INSTANCE.salesforce.com/designer/designer.apexp#Id=VERSIONID INSTANCE is your Org instance (na9, cs26, etc) VERSIONID is the version of the Flow ...
AMM's user avatar
  • 4,704
4 votes

Public Salesforce Site and Security Review

Will Security Review "kill me" for not having proper authentification Most likely. Aside from breaking the MSA or Sites TOU, improper authentication is a big no-no. I'm not even sure how I'd describe ...
sfdcfox's user avatar
  • 487k
4 votes

Salesforce URL Hack not working in lightning, sf1

You can use Lightning Quick action of type create record with predefined values to replace your url hack in Lightning and mobile app. Any url hack is simply not going to work in Lightning and ...
sanket kumar's user avatar
  • 15.2k
3 votes
Accepted

How to populate a field value through a hyperlink

HYPERLINK("/006/e?accid=" + Id , "New Opp") In a formula field for example will create a new app with the accid populated Little, hint: Click the new button and inspect the URL salesforce generate ...
Eric's user avatar
  • 54.1k
3 votes
Accepted

How to prepopulate standard Lead field Phone by hacking URL?

Right click on the field in your browser Inspect element You will see something like <input type="text" id="lea8" value=""> lea8 is in this case the id of the field you would want to include in ...
Robin De Bondt's user avatar
3 votes

String Value of ID returns more than ID

It seems to me that you should just be doing the following: TM.Meeting__c = ApexPages.currentPage().getParameters().get('EventId'); As Christian mentioned, your current code is trying to perform ...
JeffyB's user avatar
  • 121
3 votes

Custom links to generate dynamic reports in lightning

Not ideal but I ended up creating two custom links - one for Classic and one for Lightning - and adding them to the page layout. I couldn't see how to use Global Actions for this use case either. ...
MikeA's user avatar
  • 1,075
3 votes
Accepted

how to concatenate fields in one field while url hacking

I guess, you should replace the "description" key with the one in the case record. I checked that it would be "cas15" instead of description so basically your url should be something like below : Use %...
erkan çipil's user avatar
3 votes
Accepted

How to check if a child object is null in Javascript Button?

You cannot simply reference child objects with a Javascript button. You will need to do a SOQL query to see if they exist. You can do a SOQL query from within a JS button. {!RequireScript("/soap/ajax/...
Genko's user avatar
  • 636
3 votes
Accepted

URL Hacking - Trying to incorporate a unique count at the end of a pre-populated field

You can use formulas in your URL hacks, just like you can almost anywhere else. The following should work: CF00N3600000TJTHW_lkid={!Account.Id}& CF00N3600000TJTHW={!Account.Name}& Name={!...
sfdcfox's user avatar
  • 487k
3 votes
Accepted

Custom Link to Download/Export Detail Report in Lightning

You can download a report using a link in Lightning but the catch is you will not be able to set the Filters dynamically from the URL. If you are just looking for something which will simply download ...
Avinash Kumar's user avatar
3 votes
Accepted

How to test a page with parameters

Well, you don't seem to be instantiating the username and password variables in your controller during the test. So when you call validateCredentials() in your test, the controller doesn't know what ...
Renato Oliveira's user avatar
3 votes
Accepted

Soql on Account returns empty Id

In your test class, you're setting PageReference to a variable, this does not adds the parameter to Page's URL in testing mode. A small step you're missing is to set the PageReference with current ...
Raul's user avatar
  • 18.7k
3 votes
Accepted

Lightning Navigate to Create Record with Default Values not working

Remove the line breaks. It's not called out in the release notes and examples always seem to show line breaks (for readability) but line breaks do not work. /lightning/o/CustomObject__c/new?...
Kris Goncalves's user avatar
3 votes
Accepted

Lightning URL Hacking Not Working

You need to use proper merge field syntax and commas after each field You have: Lead_Type__c = (!URLENCODE('Qualified')), Accepted_Checbox__c = 'true' You need: Lead_Type__c = {!URLENCODE('Qualified')...
cropredy's user avatar
  • 70.9k
2 votes
Accepted

Preload Account ID for New Case Visualforce page

/apex/CaseCreateCTM1?AccountId={!Account.id} Pass Id in url and get id in controller and assign to Case AccountId Controller public class CaseCreateCTM1Controller { public Case objCase {get;...
Ratan Paul's user avatar
  • 22.6k
2 votes

Lightning App - getting URL parameter

There isn't any documented way of doing that, but I was able to do so using a hack. The Salesforce Lightning URL is something like "/one/one.app#_______" . The blank contains some encoded value in ...
Yogesh Arora's user avatar
2 votes

How to access and not hardcode the field ID for a custom object? Using Apex, to construct URLs

Following is solution to get fieldID by Object Name and its field Name, It can be useful to get ID dynamically for URL Hacking, auto populate field or other purpose public static Id ...
Salesforce Pro Coder's user avatar
2 votes

String Value of ID returns more than ID

Your logic can be optimized in a better way but here's a possible solutions for what you have //you also need to make sure that the EventID in the param is not empty or this will break Event tempE = [...
raym0nd's user avatar
  • 886
2 votes

Custom URL Hack - anybody know how can i find the fields IDs from "User" object?

Go to Setup > customize > user object and select any custom field> in the URL you will get the field Id Note: This is not available for standard fields. To use use them your URl would be something ...
Tushar Sharma's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible