Avnish Yadav
IndividualForum Replies Created
-
Avnish Yadav
MemberSeptember 30, 2018 at 1:27 am in reply to: Maximum number of controllers can be used for a Salesforce Visualforce Page?Currently there is no limit on the number of extensions you can have on a VF Controller. Ofcourse having too much of them would also affect the readability and maintainability of the code.
-
Avnish Yadav
MemberSeptember 30, 2018 at 1:26 am in reply to: How to add music to a Salesforce Visualforce Page?Hello,
There is no visualforce custom tag that wraps playing media, or the HTML5 media tag types.
I would suggest vanilla HTML for doing this as per the documentation here:
http://www.w3schools.com/html/html5_audio.asp
In your case, you'd just want the URL to point to a resolveable URL, whether hosted in: A static resource
Some kind of content in Salesforce (attachment, chatter feed, etc.)
An external URL from a CMS, CDN, or whatever
Given your requirement of playing a single audio file I would use a zip static resource with several different files in it, so you can support as many browsers as possible. You'd then end up with something like this:
<audio controls>
<source src="{!URLFOR($Resource.AudioFiles, 'NewPage.ogg'}" type="audio/ogg">
<source src="{!URLFOR($Resource.AudioFiles, 'NewPage.mp3'}" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
If it were dynamic, I'd probably bind the src to a field that output some kind URL pointing to the file. My first choice would then use a formula field or some Apex to populate the value. If the dynamic value was not dependent on data in Salesforce, then I'd fall back to Javascript, most likely.Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 1:23 am in reply to: How to make a web service callout in Salesforce?Salesforce provides a WSDL (Web Service Description Language) files. They are called "Enterprise WSDL" and "Partner WSDL". A WSDL is an XML-document which contains a standardized description on how to communicate using a web service (the Salesforce API is exposed as a web service). The WSDL is used by developers to aid in the creation of Salesforce integration pieces. A typical process involves using the Development Environment (eg, Eclipse for Java, or Visual Studio for .Net) to consume the WSDL, and generate classes which are then referenced in the integration.
Enterprise WSDL:
This WSDL document is for customers who want to build an integration with their Salesforce organization only. It is strongly typed, which means that it contains objects and fields with specific data types, such as integer and string. Customers who use the enterprise WSDL document must download and re-consume it whenever their organization makes a change to its custom objects or fields or whenever they want to use a different version of the API. For the reasons outlined above, the Enterprise WSDL is intended primarily for Customers.
Partner WSDL:
This WSDL document is for customers, partners, and ISVs who want to build an integration that can work across multiple Salesforce organizations, regardless of their custom objects or fields. It is loosely typed, which means that you work with name-value pairs of field names and values instead of specific data types. The partner WSDL document only needs to be downloaded and consumed once per version of the API.
-
Avnish Yadav
MemberSeptember 30, 2018 at 1:23 am in reply to: How to make a web service callout in Salesforce?Hello,
Salesforce provides a WSDL (Web Service Description Language) files. They are called "Enterprise WSDL" and "Partner WSDL". A WSDL is an XML-document which contains a standardized description on how to communicate using a web service (the Salesforce API is exposed as a web service).
Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 1:20 am in reply to: How to create Many-to-Many Relationship in Salesforce?Hi,
Creating the many-to-many relationship consists of:
Creating the junction object.
Creating the two master-detail relationships.
Customizing the related lists on the page layouts of the two master objects.
Customizing reports to maximize the effectiveness of the many-to-many relationship.Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 1:15 am in reply to: State differences between Bearer and OAuth 2 tokens in Salesforce?Hello,
Bearer Token
A security token with the property that any party in possession of the token (a "bearer") can use the token in any way that any other party in possession of it can. Using a bearer token does not require a bearer to prove possession of cryptographic key material (proof-of-possession).The Bearer Token or Refresh token is created for you by the Authentication server. When a user authenticates your application (client) the authentication server then goes and generates for your a Bearer Token (refresh token) which you can then use to get an access token.
The Bearer Token is normally some kind of cryptic value created by the authentication server, it isn't random it is created based upon the user giving you access and the client your application getting access.
Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 1:14 am in reply to: Salesforce Error: Invisible Future Method in Test Class?Hello,
Problem in your test class is that you are try to access the private method in your test class. Which is wrong.
As per your code you need to call only VerifyDate.CheckDates(System.today(),System.today()+1); method which will call your private method in class.So simply copy paste below test class and try
@isTest public class TestVerifyDate {
static testMethod void testMethod1()
{
Date d = VerifyDate.CheckDates(System.today(),System.today()+1); Date d1 = VerifyDate.CheckDates(System.today(),System.today()+60);
}}
-
Avnish Yadav
MemberSeptember 30, 2018 at 1:13 am in reply to: Give a way by which validation rule is bypassed while uploading through Salesforce Data Loader.Hello,
Simply create a Custom field in your object of the type Checkbox called as "Bypass Valdiation". Then set this value to TRUE when you update the records through the dataloader and tweak your valudation rule like this. This will ensure that the validation rule is not invoked when you update/insert through dataloader.
AND(
NOT(Bypass_Validation__c),
Your existing conditions here
)That should work !
-
Hello,
To import records from one organization into another, you'll need to import the records in a particular order to maintain their relationships. Their relationships are defined by their Salesforce IDs, not their names, so you'll need to match IDs and Names up. You can do this with a Vlookup.
Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 12:53 am in reply to: What is the difference between a Role and Profile in Salesforce?Role is always dependent of profile whereas profile can be
independent of role.Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 12:52 am in reply to: What is the difference between a Role and Profile in Salesforce?Hello,
Profiles help to control object privileges such as CRED (Create, Read, Edit, Delete). They also contain system permissions that a user can carry out such as exporting data.
Roles on the other hand help with sharing records across an organization. They work in a hierarchical fashion, giving users access to records that are owned by people lower down in the hierarchy.Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 12:52 am in reply to: Difference Between Salesforce Role And Profile?In Short,
profile – profile is basically a object level access and field level access and It is required for the users .
role – role is basically a record level access and It is not required for users .
Thanks.
-
So a custom app is really nothing more than a collection of tabs and where this becomes important is as you grow in the Salesforce platform, you end up having a lot of tabs. You have all of your standard tabs: Leads, Accounts, Contacts, Opportunities, Cases, whatever it might be. But then you also might have a bunch of custom tabs as well for your custom objects. And your users, you really want to tailor that experience for your users so they’re only seeing the tabs that are pertinent to their job role. So your back office people are only seeing tabs for their job role. Your sales people only a seeing tabs for their job role, kind of reducing the noise on the page.
Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 12:44 am in reply to: What are Static Resources in Salesforce?Hello,
Static resources allow you to upload content that you can reference in aVisualforce page, including archives (such as .zip and .jar files), images, style sheets, JavaScript, and other files.
And You can add static resources by going-From Setup, enter Static Resources in the Quick Find box, then select Static Resources.
Click New.Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 12:41 am in reply to: How can we generate an encrypted pdf from Salesforce?Steps:
From Setup, in the Quick Find box, enter Platform Encryption, and then select Encryption Policy.
Select Encrypt Files and Attachments.
Click Save.Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 12:37 am in reply to: Salesforce Integration with external system - authentication best practicesA few reasons that the external URLs would be secured are:
- The data obtained from them is not public information and only authorized clients should be able to access it e.g. someones personal details or things like bank account details.
- The URLs allow the data to be changed and only authorized clients should be allowed to make changes.
There is a concern that the URLs might be overloaded with requests e.g. unexpected clients start to use the URLs because of they available. - If none of these apply - the data is fine for anyone to see, the data is not updated, and the data is of no interest to others - you could leave the access unauthenticated.
If the access does need to be authenticated, the technique you use will depend on what is available on the server you access via the URLs - there are a variety of techniques.
Another way,
1. Go for WSDL To APEX tool if the external service supports only SOAP based request and response.
2. Go for HttpRequest Class and make callout from force.com if the external service supports JSON. Also, you can use this for SOAP request / response as well. But, you have to construct request (XML) in your code
Thanks, -
Avnish Yadav
MemberSeptember 30, 2018 at 12:31 am in reply to: How many ways we can make field required in Salesforce?Let say you want to make contact field required.
Edit the Contact page layout. Hover over the Title field and click on the Wrench icon. Then click Required checkbox and save.
Setup | Customize | Contacts | Page Layouts
Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 12:30 am in reply to: How can we lock record using SOQL so that it cannot be modified by other user in salesforce?In Apex, you can use FOR UPDATE to lock sObject records while they’re being updated in order to prevent race conditions and other thread safety problems.
While an sObject record is locked, no other client or user is allowed to make updates either through code or the Salesforce user interface.For example, the following statement, in addition to querying for two accounts, also locks the accounts that are returned:
Account [] accts = [SELECT Id FROM Account LIMIT 2 FOR UPDATE];
Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 12:29 am in reply to: How can you lock record using SOQL in Salesforce so that it cannot be modified by other user?We will need “FOR UPDATE” clause of SOQL.
Account[] accts = [SELECT Id FROM Account LIMIT 2 FOR UPDATE];
Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 12:29 am in reply to: How to lock record using SOQL so it cannot be modified by other user in salesforce?In Apex, you can use FOR UPDATE to lock sObject records while they’re being updated in order to prevent race conditions and other thread safety problems.
While an sObject record is locked, no other client or user is allowed to make updates either through code or the Salesforce user interface.For example, the following statement, in addition to querying for two accounts, also locks the accounts that are returned:
Account [] accts = [SELECT Id FROM Account LIMIT 2 FOR UPDATE];
Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 12:28 am in reply to: Do we need Burp License for the app which is containing Salesforce Apex Component?Hello,
The Burp tool must only be used to evaluate the security of your web application that resides outside of Force.com (e.g. www.partnersite.com). For applications residing completely on Force.com (e.g. partner-visual.force.com, appxpartner.force.com. etc.), please use the Force.com Source Source Scanner . So i don't think that you need a Burp scan.
Please note that you are not permitted to run this tool against any servers owned and operated by salesforce.com, without prior written approval.
Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 12:27 am in reply to: Is there any app on Salesforce AppExchange with the unmanaged package?Hello,
Yes, lots of app available on appexchange with unmanaged package.
Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 12:25 am in reply to: What is the cost of Paid App on Salesforce AppExchange?Hello,
The price depends on the developer or the requirement of that app in Salesforce CRM.
Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 12:23 am in reply to: Explain Programmatic way to set profile attributes in Salesforce.And also The Metadata API provides programmatic access from any web-service capable language including Apex itself. So if this is a modification that you want to repeat in the future it could be worth writing some code.
But a more common approach would be to read/modify/write the profiles using one of the IDEs or the Ant tools where you would use a few search and replace operations across all the files for the "modify" part.
Thanks.
-
Avnish Yadav
MemberSeptember 30, 2018 at 12:22 am in reply to: Explain Programmatic way to set profile attributes in Salesforce.You can use the Enhanced Profile List Views to update object permissions directly in the profile list view.
Setup --> User Interface --> Mark "Enable Enhanced Profile List View" TRUE
Setup --> Profiles --> Create a custom list view for your custom profiles and add the object permissions to your columns.
Check off all the ones you want to edit
Use the inline editing to mark permissions true and false
Select "All XX selected records" under "Apply changes to"
Hope this helps!Thanks.