Manpreet Singh
IndividualForum Replies Created
-
Manpreet
MemberApril 12, 2017 at 1:36 pm in reply to: Unable to Find PriceBookEntry Tab In Salesforce?Hi suraj,
You can't really find a Tab of PriceBookEntry in Salesforce.These are the Products that are added to a Pricebook.You can only Query them or display them in a visualforce Page.
Thanks.
-
Manpreet
MemberApril 12, 2017 at 1:32 pm in reply to: What is difference between public and global class in Salesforce Apex ?Hi suraj,
Public:
This means the method or variable can be used by any Apex in this application or namespace.Global:
This means the method or variable can be used by any Apex code that has access to the class, not just the Apex code in the same application. This access modifier should be used for any method that needs to be referenced outside of the application, either in the SOAP API or by other Apex code. If you declare a method or variable as global, you must also declare the class that contains it as global.A good example of the use of global is in Batch Apex. Access to running an Apex job can be administered; likewise, an administrator executing the job can do so within the context of any application.
Thanks.
-
Manpreet
MemberApril 11, 2017 at 1:31 pm in reply to: How many Field Dependency we can use in Salesforce VF page?Hi suraj,
At max you can use 10 Field Dependencies in Visualforce Page.
Thanks.
-
Hi Suraj,
You need to log a ticket to Salesforce to enable Person Accounts in Dev Edition.
To log a ticket -> Login into your Dev Edition -> Click on "Help" at the Top -> Click on "My Cases" -> Click On "Log A Case" -> Select the Case Reason as "Feature Activation Request" -> Select "Feature Activation" in "General Activation Area" and ask for the Person Account Enablement.
Hope this helps.
Thanks.
-
Manpreet
MemberApril 11, 2017 at 1:26 pm in reply to: What is the max. Number of Master Detail Relationship that we can create in a custom object?Hi suraj,
There is only 2 Master Detail Relationship allowed per object and it can have upto three custom detail levels.You can further read more about it on
https://help.salesforce.com/articleView?id=relationships_considerations.htm&type=0
Thanks
-
Manpreet
MemberApril 11, 2017 at 1:23 pm in reply to: Difference between Queueable apex and future method ?Hi suraj,
All async code can run in to stale data. The difference between Batchable, Queueable, and Future methods is how they're designed to behave. Batchable calls were designed to allow for heavy asynchronous processing. But, it was the only asynchronous code at one point, and it was too "heavy" in terms of resource usage, and had a lot of baggage associated with it. It required a long time to process and was often used only to handle callouts or things that were slightly longer than a normal transaction could handle.
So, next came future methods. Unlike Batchable methods, they were lighter on resources and perfect for doing that job that Batchable was doing before, but much more efficiently. Unfortunately, it was too efficient. You didn't know when the job was done (no Job ID), and it only had a limited amount of space to store data (the reason why it only accepted primitives and collections thereof).
In response to feedback, a third version of asynchronous code was designed: Queueable. It was lighter than Batchable, but it gave you a Job ID and let you store complex data patterns. The lesser resources it used compared to batchable also meant higher limits. Queueable was meant to be a hybrid between the limited future methods and the resource-hungry Batchable interface.
Thanks.
-
Manpreet
MemberApril 11, 2017 at 5:02 am in reply to: After deleting a record in master object what will happen for the records of junction object in salesforce?Hi saurabh,
When you delete a record in master object then records of the Junction object will also gets deleted in this case.The records are tightly coupled in a Master Detail Relationship.
Thanks.
-
Manpreet
MemberApril 11, 2017 at 4:57 am in reply to: Is there any SOQL statement that we can used to get all records even from recycle bin or Achieved Activities in Salesforce?if yes then what is the statement?Hi saurabh,
Simply use the ALL ROWS clause.
SELECT Id, isDeleted FROM <Oblectname> WHERE isDeleted = true All ROWS - This will only return the deleted rows.
SELECT Id, isDeleted FROM <Oblectname> WHERE isArchived = true All ROWS - This will only return the archived rows.
SELECT Id, isDeleted FROM <Oblectname> All ROWS - This will return the deleted records, archived records and records that are neither deleted nor archived (data set identical to the one returned by a SOQL not using ALL ROWS) as well.You can-not use ALL ROWS and FOR UPDATE together.
Thanks.
-
Manpreet
MemberApril 11, 2017 at 4:52 am in reply to: How can we lock record using SOQL so that it cannot be modified by other user in salesforce?Hi saurabh,
we will need “FOR UPDATE” clause of SOQL.
Sample :
Account [] accts = [SELECT Id FROM Account LIMIT 2 FOR UPDATE];Thanks.
-
Manpreet
MemberApril 7, 2017 at 2:07 pm in reply to: How to handle the situation when my organization Workflow's limit is over and i want to write a workflow immediately and it it critical in salesforce?Hi Saurabh,
You can do this:
1. De-activate any workflows and create it using trigger and then do the new workflow.
or
2. Go for Schedule apex or trigger to achieve this workflow.Thanks.
-
Manpreet
MemberApril 7, 2017 at 1:53 pm in reply to: if we enable bulk API then What is default batch size in salesforce?Hi Saurabh,
The batch size thats specified in the document is for a single batch.You can process as many batches as you like limiting to 2000 per 24 hour rolling period.
Thanks.
-
Manpreet
MemberApril 7, 2017 at 1:46 pm in reply to: What is the difference between Static Resources and Documents in salesforce?Hi saurabh,
Static resources are data cached and you can refer them easily in VF (including zip files) which store on Sales force server.
Documents images are required for Email Templates.
Thanks.
-
Manpreet
MemberApril 7, 2017 at 1:42 pm in reply to: Can we update the same record in After Trigger context. Is there any way or workaround?Hi saurabh,
You can do something like this :
trigger AccNameUpdate_And_ContactInsert on Account (before insert ,after insert) {
List<Contact> lst = new List<Contact>();
if(Trigger.isBefore && Trigger.isInsert ){
for(Account acc : TRigger.New){
acc.Name = 'Test'+ acc.Name ;}
}if(Trigger.isAfter && Trigger.isInsert ){
for(Account acc : Trigger.New){Contact c = new Contact();
c.lastName='Singh';
c.AccountId = acc.Id;
lst.add(c);
}
insert lst;
}Thanks.
-
Manpreet
MemberApril 6, 2017 at 4:10 pm in reply to: what is the difference between Data loader and Jitter bit data loader in salesforce?Hi saurabh,
As such I would point you to the AppExchange to read user reviews comparing JB Data Loader to Apex: http://appexchange.salesforce.com/listingDetail?listingId=a0N300000016ZoVEAU
Jitterbit Data Loader offers a subset of features and functionality from our core Cloud integration platform. Included are the same performance features, including complete support for the Bulk API.
You can also edit batch sizes on a per-operation basis. Each operation runs against a specific SFDC object.
I'd highly recommend that you try Jitterbit Data Loader for yourself -- it is easy to install and configure and we offer a number of Youtube videos to help get you started --- plus it's free, so there isn't much risk, only upside when you realize how much easier it will make your job 🙂
Thanks.
-
Manpreet
MemberApril 6, 2017 at 4:08 pm in reply to: Is there any way by which we can display multiple columns after clicking on the tab in salesforce?Hi saurabh,
Click on the tab(Which should be realted to any of the custom/standard object)
Expand Force.com Quick Access Menu > Edit Columns > Move the needed fields from Available Fields to Selected Fields. > Click on Save > User should be able to see multiple columns.
(OR)
Click on Setup > Create > Objects > Select the corresponding object link > Under Search Layouts section > Click Edit which should be left to Object Tab > Move the needed fields from Available Fields to Selected Fields. > Click on Save > User should be able to see multiple columns.Thanks.
-
Manpreet
MemberApril 6, 2017 at 4:06 pm in reply to: what's the relationship among Product , PriceBook and PriceBookEntries in salesforce?Hi suraj,
Here's a schematic of the relationships involved.
Products are related to Pricebook via the PriceBookEntry (junction) Object. OpportunityLineItems look up to the PriceBookEntry Object, rather than looking up directly to Product2.
Therefore if you want to select Products with Opportunities, it will have to be via the PriceBookEntry Relationship.
Thanks.
-
Manpreet
MemberApril 6, 2017 at 4:00 pm in reply to: What is the difference between ISBLANK() AND ISNULL() in salesforce?Hi saurabh,
Text fields are never null, that means even if you didn't provide any value ISNULL() function takes empty as a value.
so using ISNULL() with a text field always returns false.
For example, the formula field==== IF(ISNULL(new__c) 1, 0) is always zero regardless of the value in the New field.For text fields, use the ISBLANK function instead.
IF(ISBLANK(new__c) 1, 0) true if if has a value
IF(ISBLANK(new__c) 1, 0) false if it don't have a valueThanks.
-
Manpreet
MemberApril 5, 2017 at 4:20 pm in reply to: Is it possible to delete junction – Object in case of Mater – Detail Relationship in salesforce?Hi Saurabh,
If the parent objects don’t have Roll up Summary fields for the child object then we can delete.
To delete a child object it should not be referred in Apex Classes and Apex Triggers.
Later if we undelete the object, Master detail fields on the junction objects will be converted to look up Fields.
Note:
If we delete only Master – Detail Relationship field from the child object and undelete it from the Recycle Bin then it will be converted to look up relationship.
Parent Object we cannot delete because it will be referred in the child object.Thanks.
-
Manpreet
MemberApril 5, 2017 at 4:19 pm in reply to: What is the difference between task and event?Hi suraj,
As per salesforce definition:
An event is a calendar event scheduled for a specific day and time.Examples of events are:
1) Meetings
2) Scheduled Conference CallsA task is an activity not scheduled for an exact day and time. You can specify a due date for a task or there may not be a particular time or date that the tasks or activities need to be completed by.
Examples of tasks are:
- A list of phone calls you need to make.
- An email that needs to be sent.This functionality allows users more flexibility in using sales force as a daily task manager.
Thanks.
-
Manpreet
MemberApril 5, 2017 at 4:16 pm in reply to: We can't call future from future method but we can call batch class from another batch whereas both are asynchronous?Hi Suraj,
You cannot call a method annotated with future from a method that also has the future annotation. Nor can you call a trigger from an annotated method that calls another annotated method.
1.) There are no limits on the number of @future methods you can have inside of a class, however there are limits on the number of future calls you can make in a given transaction (50 calls per transaction)
2.) Because it's a limtiation of the system. If I had to take a guess, it's to keep the system from being flooded with forked calls (look at the bash fork bomb for what could happen)
3.) Yes, you can write tests just like you normally would. The only stipulation is that the future calls will not occur until you make a Test.startTest or Test.stopTest call
4.) All future methods are Asynchronous but not all async calls are future. For example, batchable and scheduled apex are async.AJAX by definition is asynchronous (Asynchronous JavaScript And XML)Thanks.
-
Manpreet
MemberApril 5, 2017 at 4:12 pm in reply to: Difference between Custom tab and Visualforce Tab in Salesforce?Hi Suraj,
A custom tab is the way to read the object's records.You can have a custom object without having an associated tab
You can't have a custom tab without an associated custom object.There are different types of custom tabs, so it is possible to have a custom tab without an associated custom object (web tabs, visual force tabs, etc).
https://help.salesforce.com/apex/HTViewHelpDoc?id=dev_tabdef.htm
Thanks.
-
Manpreet
MemberApril 4, 2017 at 2:17 pm in reply to: Private Permission in Account object for Opportunities then by using OWD can i make it visible to other user in salesforce?Hi suraj,
If your OWD for Account Object is Private , then two persons of different profiles won't be able to see each others records.You can then open up visibility by using either the Role Hierarchy or Sharing Rules or ultimately Manual Sharing.
Thanks.
-
Hi suraj,
The Setup Audit Trial is on the Organization level, Field History Tracking is on the Object level. The setup audit trail history helps you track the recent setup changes that you and other administrators have made to your organization. This can be especially useful in organizations with multiple administrators.
Thanks.
-
Hi suraj,
I have used "ob" to show the new record. Therefore it should be inserted in the Save function.
___________________________________________________________________________
public class Test {
public Test ob {get;set;}
public Test(ApexPages.StandardController controller) {
Contact c = (Contact)controller.getRecord();
ob = new Test();
ob.Contact__c = c.Id;
}public PageReference save() {
insert ob;
PageReference pg = new ApexPages.StandardController(ob).view();
pg.setRedirect(true);
return pg;
}
}Thanks.
-
Manpreet
MemberApril 4, 2017 at 7:05 am in reply to: How to give access permission to Junction Object in salesforce?Hi saurabh,
Does your Roles gives access to records and field values and have your OWD gives access to objects and fields ?What do you want Users to see?
Thanks.