30

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="world"/> Hello {!v.whom}! </aura:application> Here is how the result will look like Now I will add a query parameter with value as per my ...


14

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.currentPage().getParameters().get('EventId'))].Id); But you don't even need to use String.valueOf(). ID can be directly cast to String: EventIdString = (String)[...


9

When saving a new record, you can use the saveURL parameter: {!URLFOR($Action.Contact.NewContact, c.id, ['saveURL'='/home/home.jsp'])} When editing an existing record, you can use the retURL parameter: {!URLFOR($Action.Event.Edit, c.id, ['retURL'='/home/home.jsp'])}


9

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, say you wanted to validate the value first, to make sure the user can see it (so they're not just faking a value), you could do this: String eventId = ApexPages....


8

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:isUrlAddressable interface and use pageReference attribute. Example. - Component Assume url is https://<instance>.lightning.force.com/lightning/cmp/<...


7

eid is a custom object, the "entity ID". Presumably, you could use this to view an instance of your record. feoid is the "field entity ID". This describes the field that the content is stored in. You can see this value when you're looking at the field in the Setup screen. refid is an ID of the type ContentReference. We're not able to describe this object, ...


7

If you use chatter, you could use actions to populate your defaults. More info can be found here. Here are some screen shots of a quick example of how it would work:


7

We shouldn't have been doing those things in the first place. I would assume that by implementing these hacks, we've moved on thin ice and built features that could not be regression tested by salesforce and thus get broken by salesforce. This would not just reflect poorly on those who've created additional functionality, but on salesforce as a whole. My ...


7

At this point I guess the only 2 ways remaining open for a short time are Messages & Alerts and Custom Links, where you still can inject JS into standard Aloha Salesforce pages. Alternatively you could try to use a community, where you can inject JS via Header and Footer. But even these will be shutdown with Spring'16 as announced by Salesforce via ...


7

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. If you want to go that far, you could parse the existing layouts using the Metadata API and then use the page parameter to query for the correct one. You could ...


7

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="reportRedirect" controller="controllername" action="{!gotoReport}"> .......No content needed here unless you want it like a waiting spinner or something .......


6

You said you want to send it to "fixed email address" You don't need "To" field. "To" will correspond to "recipient" record (Contact/Lead/User) which can be referred to in the email template. For just a hardcoded mailbox use "Additional To" instead: &p24=example@example.com If you want to populate the "To" after all p2 is the visible name field, "John ...


6

URL Hacking is only going to help with populating values on the newly created record, it's not capable of updating related records. You're only real option for this is to use a trigger that updates the lookup on the opportunity whenever the contract is created. As an aside, you might take this a step back and see if you really need that extra lookup. ...


6

I can't actually find any hard documentation to prove it, but it seems that Merge Fields available in Custom Buttons & Links cannot access Related Object Fields, but only those fields on the record in context. I would be appreciative if someone has some links that clearly state this. It seems to be the case, but seeing it stated in documentation would ...


5

You can use SOQL date literals, such as LAST_N_MONTHS:6 or LAST_N_DAYS:90.


5

Found the solution! Apparently, salesforce automatically adds a parameter called newId to the saveURL. Just as an example here is my use case - I have an object called Compliance that lives on Opportunity (has a lookup to Opportunity, and is created from Opportunity) and has a many-to-many relationship with Quote and Sales Order (custom objects). The many-...


5

Sorry I misunderstood you. here is a the right solution for your problem <apex:page standardController="Lead"> <apex:form> <apex:inputtext id="jsName"/> <script> var jsName = "{!$Component.jsName}"; </script> </apex:form> <script> window.onload=function() ...


5

You need forgot an '=' and also you only need to use {!user.Name} Try /a14/e?CF00N30000007Cehz={!User.Name}&CF00N30000007Cehz_lkid={!$User.Id} Hope that helps


5

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}&CF00N20000002kMy5= {!Contact.Name}&CF00Nw0000008ZPxv={!User.Name}&CF00Nw0000008ZPxv_lkid= {!User.Id}


5

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 Then the attribute name must be same as the the Url which contains the values myFirstApp.app <aura:application> <aura:attribute name=”AccountId” type=”...


5

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 the following: {!URLFOR( '/lightning/o/Quote/new?defaultFieldValues=Name=' + URLENCODE(Opportunity.Name) + ',OpportunityId=' + Opportunity.Id + ',...


4

This issue makes sense to me: system.assertEquals(RAELS.size(), srListIds.size()); // <--- this fails since you're calling Database.insert(nwAssnmnt, false); which means it won't fail the entire insert if just one of the inserts fails (false = partial processing is permitted). So just one fail would mean your two lists would be of different sizes. As ...


4

This should work without any quotes around other. I have verified in my dev org. This URL fills the picklist value represented by 00N80000004NQwL with Active https://na6.salesforce.com/001/e?retURL=%2F001%2Fo&RecordType=0123000000096rr&00N80000004NQwL=Active See screenshot of pre-filled pick list field Then if I change the URL to a different ...


4

Not sure if it is still an issue, but here is a link to a blog post from a few years back claiming that CommandButton doesn't actually invoke the setter. http://blog.jeffdouglas.com/2010/03/04/passing-parameters-with-a-commandbutton/ He brings up 2 recommendations: use CommandLink and style it to look like a CommandButton rerender a hidden PageBlock ...


4

You are missing one other param to which you pass the actual name of the opportunity (when you remove _lkid you are passing the lookupfield name = {!opportunity_Id}) Read this blog for thorough understanding on hop to do URL hacking with lookups some ID field: e.g. CF00…. This corresponds to the ID of the field that you want to be prepopulated. This ...


4

There are these two techniques for getting the field IDs programmatically: Querying Custom Object and Field IDs via Tooling API - recently available and relatively robust Finding Visualforce fields ids - older and potentially fragile (but has been in in use for several years in some of my code) This is assuming that the fields you are trying to default are ...


4

Solution: Similar to populating a custom lookup field using the URL hack, you need to set both the field label and it's value to the desired default, in this case nothing. Example: /{!Opportunity.Id}/e?clone=1&retURL=/{!Opportunity.Id}&CF00Nj0000003U70C=&CF00Nj0000003U70C_lkid=


4

You should be able to use the "Create Record" publisher action to define all the fields you want. You won't need to to use sforce.one.navigateToURL() to do this (and it wouldn't work as it doesn't allow you to specify a full url). Note, you also shouldn't need to use a custom Visualforce page as you can define all the fields you need on the publisher action ...


4

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 features each release. In the release notes there's usually a section about what new is supported but also what isn't yet. Option 2 Try using Chatter Quick Actions ...


4

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 referenced in the error message (301*).


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