sushant ujlayan
IndividualForum Replies Created
-
sushant
MemberFebruary 7, 2017 at 12:58 pm in reply to: How can we make floating header bar in Salesforce?Hi Pranav,
The straight answer from a platform feature function perspective is no, there is no way to configure this, i agree its a good request from a UX perspective though! Maybe something to raise onIdeasExchange.
While you might be able to hack this through a side bar component that manipulates the page DOM, this is not safe as it depends on the internal rendering of the page which can change at any time by Salesforce, also the sidebar is not always visible unless configured so by the user.
The other consideration is to build a Visualforce page and within it a scrollable region containing your UI. Your question does not really state if your looking for all of the UI the user uses or maybe just certain aspects. So I thought I would throw this option in, just in case. It obviously requires some development skills and is not a general solution, only for areas you build a UI for, which need not necessarily be from scratch, as their is some great components in Visualforce for reproducing the standard UI, but does requirement development effort.
Thanks
-
sushant
MemberFebruary 7, 2017 at 12:56 pm in reply to: In Salesforce, what kind of security risk of associate of using Javascript remoting, escape = false? -
sushant
MemberFebruary 7, 2017 at 10:25 am in reply to: What is difference between the use of {#var.attribute} and {!var.attribute} in Salesforce?Hi Mohit,
f you want to show a value dynamically based on a aura:attribute, generally we tend to use: {!v.attrib}
Eg: <ui:button label="{!v.attrib}" />
So if you do cmp.set('v.attrib','test'), then aura:framework automagically does an dirty checking and changes the value accordingly.(Two-way binding)
So the label of the <ui:button> is set to test, just think of this as special expression that directly point to the live reference of the attribute in the component(JS perspective), which is quiet similar to{{v.attrib}} expression in Angularjs which eventually does the same thing.
What if you want to show a value dynamically based on a aura:attribute but it needs to work only once,when it is rendered in the view initially.
So you should go with : {#v.attrib} expression, which might improve the performance if there large no.of such expression(where you don't need such bindings), because it won't be taken into account during dirty checking.AngularJS also has the same one-way binding stuff in its armour :{{::v.attrib}}
For example:
<aura:component>
<aura:attribute name="test" type="String" default="world"/>
hello {#v.test} // print hello world and does not change
hello {!v.test} // prints hello world and 'test' changes based on input value
<ui:inputText value="{!v.test}"/>
</aura:component>Thanks
-
sushant
MemberFebruary 7, 2017 at 10:18 am in reply to: Unable to Loading files greater than 5M using Salesforce Visualforce page -
sushant
MemberFebruary 6, 2017 at 1:09 pm in reply to: Does wrapper class list updated in salesforce?Hi Pranav,
Yes you can update wrapper class list.Here is the example:
public class exampleClass{
public exampleWrapper[] wrap {get;set;}
public exampleClass(){
wrap.add(New exampleWrapper(New Account());
}public void updateAccounts(){
Account[] accts = New Account[]{};
for(exampleWrapper w : wrap)
accts.add(w.a);update accts;
}
public class exampleWrapper{
public Account a {get;set;}public exampleWrapper(Account acc){
a = acc;
}
}
}
Thanks
-
sushant
MemberFebruary 6, 2017 at 1:06 pm in reply to: How can a get the debug log for the public profile in salesforce (In Winter 17 )? -
sushant
MemberFebruary 6, 2017 at 1:05 pm in reply to: What is standard and custom indexed in Salesforce? What Indexing meaning in salesforce? -
sushant
MemberFebruary 6, 2017 at 12:59 pm in reply to: How to create a form and quotation on Salesforce ?Hi Sandra,
You can make form using Visualforce Page or Lightning Page in salesforce.
For quotation,You can follow this link:
https://help.salesforce.com/articleView?id=quotes_create.htm&language=en&type=0
Thanks
-
sushant
MemberFebruary 2, 2017 at 3:29 pm in reply to: How to avoid trigger recursion in Salesforce?Hi kumar,
Use a static boolean variable and check for its value inside the trigger everytime it is executed.
Thanks
-
sushant
MemberFebruary 2, 2017 at 3:27 pm in reply to: What are the disadvantages of implementing Database.stateful in salesforce ?Hi Mohit,
Database.stateful implementation fills a list of records and if that list is filled with more than 10000 records at a time and we make that list global then it will result into an error if we query on that list.
Thanks
-
sushant
MemberFebruary 2, 2017 at 3:22 pm in reply to: Is it possible to connect 2 Salesforce platforms to 1 SharePoint system?Hi Abhay,
Follow this link:
https://developer.salesforce.com/forums/?id=906F0000000fzfWIAQ
hope it helps you.
Thanks
-
sushant
MemberFebruary 2, 2017 at 3:20 pm in reply to: Hours between two date time formula showing negative values in SalesforceHi Samuel,
Use this formula:
ROUND(
/* 24 * 5 days * weeks */
24 * 5 * FLOOR((First_Response__c-CreatedDate)/7)
/* max 24 * 5 days */
+ MIN( 120,
/* days from the last week */
24 * FLOOR( MOD((First_Response__c-CreatedDate)/7, 5) )
/* hours difference */
+ MOD(First_Response__c-CreatedDate, 1)
),
2)Thanks
-
sushant
MemberFebruary 1, 2017 at 1:18 pm in reply to: How to link documents in Sharepoint to a Documents object in Salesforce?Hi Tanu,
Follow this link:
https://success.salesforce.com/answers?id=90630000000D9f1
hope it helps.
Thanks
-
sushant
MemberFebruary 1, 2017 at 1:11 pm in reply to: Can we restrict the reusability of any lightning component to some specific app or other components?Hi Tanu,
For using a component in an app ,you have to add that component to that app like
<c:yourcomponentname/>
if you don't want to use that component in an app,you just should not include that component in that app.
Hope it helps you.
Thanks
-
sushant
MemberFebruary 1, 2017 at 1:04 pm in reply to: What is Apex cookie class And how to Use it in salesforce?Hi Vikas,
Follow this link:
hope it helps.
Thanks
-
sushant
MemberFebruary 1, 2017 at 1:01 pm in reply to: What is Apex crypto class and how to use it in salesforce?Hi Vikas,
Follow this link,it may help you:
Thanks
-
sushant
MemberJanuary 31, 2017 at 1:54 pm in reply to: Automatically resize Inline visualforce components on a standard salesforce visualforce pagelayout?Hi Tanu,
I don't believe there is, from what I recall I've always had to set a static height. Unfortunately the standard page layout and the Visualforce get served up from different domains, so you can't do any cross site scripting to access the Visualforce page's parent and resize the iframe.
The alternative is using a custom VF page to replace the Standard Page Layout (using apex:detail) and appending your Visualforce customizations to the bottom
Thanks
-
sushant
MemberJanuary 31, 2017 at 1:52 pm in reply to: What is Authentication Type For Talend Data Migrationt Tool in salesforce -
sushant
MemberJanuary 31, 2017 at 1:50 pm in reply to: Display related contacts in google map for an account in salesforce -
sushant
MemberJanuary 31, 2017 at 1:48 pm in reply to: How to display list of accounts on google map in salesforce?Hi Vikas,
<apex:page standardController="Account">
<apex:pageBlock >
<head><script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">$(document).ready(function() {
var myOptions = {
zoom: 20,
mapTypeId: google.maps.MapTypeId.HYBRID,
mapTypeControl: true
}var map;
var marker;var geocoder = new google.maps.Geocoder();
var address = "{!Account.Project_Street_Address__c}, " + "{!Account.Project_City__c}, " + "{!Account.Project_Zipcode__c}";var infowindow = new google.maps.InfoWindow({
content: "<b>{!Account.Name}</b>"
});geocoder.geocode( { address: address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK && results.length) {
if (status != google.maps.GeocoderStatus.ZERO_RESULTS) {//create map
map = new google.maps.Map(document.getElementById("map"), myOptions);//center map
map.setCenter(results[0].geometry.location);//create marker
marker = new google.maps.Marker({
position: results[0].geometry.location,
map: map,
title: "{!Account.Name}"
});//add listeners
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
});
google.maps.event.addListener(infowindow, 'closeclick', function() {
map.setCenter(marker.getPosition());
});}
} else {
$('#map').css({'height' : '15px'});
$('#map').html("Oops! {!Account.Name}'s address could not be found, please make sure the address is correct.");
resizeIframe();
}
});function resizeIframe() {
var me = window.name;
if (me) {
var iframes = parent.document.getElementsByName(me);
if (iframes && iframes.length == 1) {
height = document.body.offsetHeight;
iframes[0].style.height = height + "px";
}
}
}});
</script><style>
#map {
font-family: Arial;
font-size:12px;
line-height:normal !important;
height:500px;
background:transparent;
}
</style></head>
<body>
<div id="map"></div>
</body>
</apex:pageBlock>
</apex:page>Hope this helps you.
Thanks
-
sushant
MemberJanuary 30, 2017 at 2:48 pm in reply to: How to write data inside CSV file using Apex code?Hi Mohit,
Follow this link,it may help you:
http://www.forcetree.com/2010/08/read-and-insert-records-from-csv-file.html
Thanks
-
sushant
MemberJanuary 30, 2017 at 2:45 pm in reply to: How to fetch events created in a particular hour from Google calendar?Hi Shafali,
Follow this link,it may help you:
https://developers.google.com/google-apps/calendar/v3/reference/events/get
Thanks
-
sushant
MemberJanuary 30, 2017 at 2:42 pm in reply to: How to get a list of Sobjects in Javascript from the controller in salesforce?Hi Kumar,
You can try the following code:
<script>
var jsAccounts= new Array();
<apex:repeat value="{!accns}" var="accn">
jsAccounts.push(accn);
</apex:repeat>
</script>Then your jsAccounts array will have the account values. Now you can just loop through the array and access the field. Just try console.log(jsAccounts) to see the content of the account array. Then you will understand who you should retrieve the values
Thanks
-
sushant
MemberJanuary 27, 2017 at 2:25 pm in reply to: How to toggle sidebar of a standard Salesforce page?Hi Pranav ,
Go To Setup > Administration Setup > Manage User > Profiles > "Customer Portal Profile" > Uncheck "Show Custom Sidebar On All Pages" under "General User Permissions" section > Save
After this what you can do is create a home page component which will not have any component like search, recent items etc and assign it to Customer portal Profile.
Setup > App Setup > Home > Home Page Layout
Also ,
Setup --> Customize --> User Interface. and then you get the screen in which you can uncheck the option "Show Custom Sidebar Components on All Pages" in the Side Bar section and then check that its working in the customer portal or not.Thanks
-
sushant
MemberJanuary 27, 2017 at 2:22 pm in reply to: How to show more than 3 dashboard components in Salesforce?Hi Pranav,
Goto YourName-->setup-->Customize-->home-->Home page components
Click New to create a custom components,
Give the Name to the components and then select HTML area
After that Select show HTML check box as shown in the screenshot
Then paste the following code,
<iframe src="/00000000000?isdtp=lt" frameborder="0" height="900" width="1280"></iframe>Note:-/000000000 is the Id of the dashboard,change that into your dashboard Id which you want to display in the Home page.
Thanks