Guest Post sfdcpoint
Guest Post to sfdcpoint.com Want to contribute an article to sfdcpoint.com? Please share your post to dureja.ankush90@gmail.com. Purpose of sfdcpoint.com is to share knowledge with salesforce community. So all of you are welcome to post your article on sfdcpoint.com.
Here are some of tips for post:
- Article Quality : Try to write an article with more than 300 words.
- Screenshot: Sometime image speaks more than words. So its advisable to add some screenshot.
- Video: If possible, add some video for demo. Its not necessary.
Send your article to dureja.ankush90@gmail.com with subject line sfdcpoint guest post. We will review your post. Once approved we will post your article to sfdcpoint with your name. You will also be rewarded with some goodies.
Good Luck 🙂
4 comments
Skip to comment form
Give access to Question object for Guest user in Salesforce community
Author
Can you please explain what do you mean?
Hi ,
We are facing issue with Spring 20- URL hack release.
Issue:
We have a “New Survey Feedback”- List Button on Account that launch a new record form with pre-populated data.
Below Url’s are working induvidually in classic and lightning.But we are not able to combine both url’s in one button (i.e, based on user interface ,url should work automatically).Please help us
Working Classic URL:
======================
/a1U/e?Name=This+will+be+filled+automatically&CF00N5800000AGHVc_lkid={!Account.Id}&CF00N5800000AGHVc={!Account.Name}&retURL=/{!Account.Id}
Working Lightning URL:
======================
/lightning/o/Survey_FeedBack__c/new?defaultFieldValues=Name=This+will+be+filled+automatically,Account__c={!Account.Id}&backgroundContext=%2Flightning%2Fr%2FAccount%2F{!Account.Id}%2Fview
Please help me on this.
Thanks,
Raju
Mobile:9030709188
Hi Raju,
I may be very late posting an answer to your question…but it can be of someone’s help.
The trick is to identify whether the user is in Classic or Lightning, and this can be done by getting the value of theme with help of UserInfo.getUiThemeDisplayed() function.
Take a Boolean value like below:
Boolean isLEX = UserInfo.getUiThemeDisplayed().startsWith(‘Theme4’);
Then using if statement like below:
if (isLEX) {
******give lightning URL here*****
}
else
{
******give Classic URL here*****
}
Reference:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_variables_global_useruitheme.htm