Avijit Das
  • Member for 4 years, 10 months
  • Last seen more than 1 year ago
  • Kolkata, West Bengal, India
Access user's MY SETTINGS through apex code
Accepted answer
9 votes

It can be done. There is field called UserPreferencesDisableFollowersEmail which actually store the Follow me option data for the user. so if you want to do this via trigger or class just put the ...

View answer
System.AsyncException: The Apex job named "Scheduled Job0" is already scheduled for execution
Accepted answer
6 votes

Its basically the issue with the scheduled job names. When Scheduled Job2 is running and trying to scheduled next set of Scheduled job its finding that a job named Scheduled Job0 is already running or ...

View answer
How to Get Access of Activity for Custom Object
Accepted answer
4 votes

Go to Page Layout of each record of each custom object : edit the lay out. Go to related list . Add two related list and those are Activity History and Open Activities please refer the screenshot: ...

View answer
Need help understanding get/set methods, weird behavior
Accepted answer
4 votes

I have observed Apex properties - a convenient way to implement getters and setters - only being referenced once even though the Visualforce includes multiple references. It seems like there is some ...

View answer
assign values to a Map<Id,List<SObject>> in an apex trigger
Accepted answer
3 votes

you can use below code to get your desired Map : - for(Account_Territory_Loader_vod__c atl: atlList) { if(accATLMap.containsKey(atl.account_vod__c) && accATLMap.get(atl.account_vod__c) != ...

View answer
Update all Contact owners when custom field on Account changes
Accepted answer
3 votes

in spite of checking the old value by iterating the loop you can check this by using Trigger.oldMap and Trigger.newMap, use the below snippet : trigger pipelineRepContactUpdate on Account (after ...

View answer
Auto Follow / Unfollow Account when user added / removed from Account Team
Accepted answer
3 votes

You are absolutely correct trigger can not be written on AccountTeamMember Object and also writing a batch class is not a very good option. I have faced the similar issue, there is a work around by ...

View answer
Inbound Email Object to create (Email to Lead)
Accepted answer
3 votes

you have to define a new email service like below : - create a Apex class named like "CreateRecordFrmEmail" Your Name | Setup | Develop | Email Services . refer the class which will be given below . ...

View answer
Can we deploy the `Data Category Groups` and its related categories ? If yes, then under which component of the Change Set will it come?
Accepted answer
2 votes

I don't think you can use change sets and salesforce recommends a manual migration. Using Metadata API to deploy category changes from one organization to another permanently removes categories and ...

View answer
extract existing files from opportunities and send as an attachment in email
Accepted answer
2 votes

Please do the below changes : - query was right need to do in ContentDocumentLink. Need to change the second query , that query need to done in ContentVersion like belwo : - SELECT ContentDocumentId,...

View answer
Not able to create ContentDocumentLink from sforce ajax
Accepted answer
2 votes

Please find my below code: - <apex:page > <script type="text/javascript"> var __sfdcSessionId = '{!GETSESSIONID()}'; </script> <script src="/soap/ajax/33.0/...

View answer
Convert a number picklist to date field & send email on that date before
Accepted answer
2 votes

Please use below formula while creating the formula field to fulfill your requirement : Say your Picklist Field Name "CustomField__c" and values are 01,02,03...........and so on create formula field ...

View answer
Alert Notification When a Scheduled Job is deleted from Scheduled Jobs in Salesforce
2 votes

If you say any direct process then there is no standard process is available, but there is a work around by which i think you can achieve this functionality create on Batch class and schedule it ...

View answer
Post into chatter group without access to the group
Accepted answer
2 votes

It's a very common problem. I have already faced the same issue.the solution is to move the same functionality in the trigger. As the trigger run on system mode,then there will be no issue regarding ...

View answer
illegal assignmet database.querylocator to list<campaign>
Accepted answer
2 votes

Database.getQueryLocator returns the List. So you just need to assign the the list of values like below : - global Database.QueryLocator start(Database.BatchableContext bc) { query = ...

View answer
DML on Territory Object
Accepted answer
2 votes

In Salesforce some standard objects don’t support DML operations although you can still obtain them in queries. Territory is one of the object where you can not perform DML operation, Way out to ...

View answer
Copying ContentVersion Image File from one record to another with Apex
2 votes

The below code works without throwing any errors: - ContentVersion cont =[SELECT Checksum,ContentDocumentId,ContentLocation,ContentSize,ContentUrl,Description,FileExtension,FileType,...

View answer
Issue with slds grid with size
2 votes

You need to use "Style" property for that where you can define your columns size.Please find the below code snippet : - <apex:pageBlock id="winwirepgblocl" > <div class="slds-...

View answer
Content Version's record is not visible
Accepted answer
2 votes

To solve your purpose trigger needs to be invoked on ContentDocumentLink. When you are uploading the file from File Tab trigger will fire on "ContentVersion" object, but when you are uploading file ...

View answer
Hide custom button on visualforce page
1 votes

It is very simple just do the following steps: create one boolean variable say hidebtn and make the value false Make it true in the below code: if(case.Person_Role__c==NULL){ hidebtn = true; ...

View answer
Validation Rule Formula
1 votes

You can use the below formula, It should work : - AND( Deposit_date__c > TODAY(), Deposit_date__c <DATE(YEAR(TODAY()),MONTH(TODAY())-1,26) )

View answer
Standard Salesforce convert into custom object
1 votes

The field was not visible in Lead Object, but you do the below steps : - do the following query : SELECT ConvertedOpportunityId FROM Lead WHERE Id = '00Q90000001LVVh'//Lead Id If your checkbox "Do ...

View answer
How to maintain sr no on orderitem?
1 votes

There are two ways you can achieve the functionality : - you can create sr_no__c field as auto number,then whenever one record is inserted the number filed will automatically increased. if you want ...

View answer
Is there any best way to deploy custom profiles in Salesforce?
1 votes

It's not possible to upload a change set containing only profiles so you'll need to make sure that a component is also included. Profiles are not officially supported as individual components in ...

View answer
Update child object with parent object value
1 votes

You need to run your trigger on before action (like before insert and before update), below are the code snippet : Apex trigger : trigger trg_conType on Contact (before Insert,before Update) { ...

View answer
hiding specific input fields in apex repeat
1 votes

Since you know exactly what field you are going to show in <apex:outputField> you can use output Field : - <apex:repeat value="{!lstvalue}" var="item"> <apex:outputText value="{!...

View answer
Visualforce Email Template issue with Case Owner values
1 votes

You won't be able to direct access the case owner name, role for that you have query, please find the solution below : - your email template is correct, just use component like below : - Apex ...

View answer
Inserting Parent and child records in apex without using external id
1 votes

Yes the error is given are absolutely correct , the reason is : you are assigning the parent id in child object before inserting the value of parent object. your code should be like below : // ...

View answer
Attach Inbound Emails in salesforce
Accepted answer
1 votes

Using salesforce standard feature it is not possible for you need to incorporate inbound email service class, here is sample code for Inbound email service and using the class you can create the ...

View answer
Show only one validation error at a time in VF page
1 votes

You are doing the correct change but need to little bit more changes :- while you are giving blank values it should checked in your second if block like below : - if((email != null && email ...

View answer