• 114 Points
  • Member since 2017
  • Salesforce Developer
  • MST Solutions

  • Chatter
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
  • 46

What are the steps for filing up data from production to Sandbox.

I am creating a dev andbox and i am planning to use data loader to export data from prod and use it to import in sandbox.
I am panning to go in thi manner quote line item > quote > opp > account

What other things i need to pay attention to ?

Hello, I am new to Apex coding... So am having some issues with syntax. 

Variables declared:

String Attribute10__c='Sample String 1';
String Attribute1__c='Sample String 2';
String Attribute3__c='Sample String 3';
String subject__c=''Sample String 4;
String Attribute11__c;
Integer cal_length;
Integer no_of_chars_from_case_tittle;
String case_tittle_length;

Logic to be implemented:

cal_length = 50 + Attribute10__c.length()+ Attribute1__c.length() + Attribute3__c.length();               
case_tittle_length = subject__c.length();
if (case_tittle_length <= 140-cal_length ) 
no_of_chars_from_case_tittle = case_tittle_length ;
no_of_chars_from_case_tittle = 140-cal_length ;
Attribute11__c = subject__c.substring(0, no_of_chars_from_case_tittle);

I need help in constructing a apex code that I can execute in Workbench. I would like to get the values of Attribute11 and no_of_chars_from_case_tittle through system debug. Can anyone please help?
I created a time clock app very basic 5 required fields:
User-added image
Here are my questions:
1. I would like a formula to calculate the hours volunteered that day
2. I would like to add a "Submit" button (Most will be accessing this on salesforce 1 mobile)
3. I would also like to add actions at the end
     a. Update a Volunteer hours Campaign
     b. Update the Members contact record with their hours
Hi Everyone,

Could you explain what is "Connected App" in salesforce and what are its usage.
If you provide example for this means,It would be great..

Hi Everyone,

When I try to save account record which triggers queueable apex shows following error.

User-added image

Kindly provide me the solution to overcome this error.

Hi Everyone,

I could not group by a currency field in SOQL,
Select count(id),currency__c from contact group by currency__c
It shows the following error,

field 'currency__c' can not be grouped in a query call

Kindly provide me a solution,

Hi Everyone,

My requirements is when I click back button on browser from VF page error should be thrown.And Previous page should not be viewed.

Hi Everyone,

I want to create Opportunity line item when I update Opportunity Stage to "Closed Won".

It works for when create new Opportunity but not works when I update an existing Opportunity.

It shows below error
FIELD_INTEGRITY_EXCEPTION, field integrity exception: PricebookEntryId (pricebook entry is in a different pricebook than the one assigned to the opportunity)
Hi Everyone,

I have 2 Custom fields as count__c and inte__c in Account Object. I want query for below credentials....

1) select count__c + inte__c from account;

2) select sum(count__c ) + sum(inte__c) from account;

How to achieve those things

Thanks & Best Regards,
Hi Everyone,

What is Wrong with this code,while I'm trying to display sum of child value in parent getting this error when save child record

Error:Apex trigger rollupcount caused an unexpected exception, contact your administrator: rollupcount: execution of AfterUpdate caused by: System.DmlException: Update failed. First exception on row 0; first error: MISSING_ARGUMENT, Id not specified in an update call: []: Trigger.rollupcount: line 41, column 1

trigger rollupcount on Contact (after  insert,after update,after delete,after undelete) {
    List <Account> ac=new List<Account>();
     set<id> setid=new set<id>();
    if(Trigger.isDelete) {
     for(Contact test:Trigger.Old) {
   (Trigger.isinsert || trigger.isundelete || trigger.isupdate) {

     for(Contact test:Trigger.New) {

 AggregateResult[] cnt=[SELECT sum(Number__c)sumamt FROM Contact where AccountId in :setid ];
 for(AggregateResult c:cnt)
        account ac11=new  account();
            Integer count = Integer.valueOf(c.get('sumamt'));
      update ac;
Thanks & Best Regards,
I have a below SF URL used in a custom link , Is this possible to make it accessable only to certain profiles, for others it should show " insufficient privilages" ?
Hello all,
 In my org contact email Field is ecnryped fields , but i need to query list of email address using soql, like

 list< contact> con= [select id, name , email from contact where email=:listofUniqueemail];
but i am unable to use this command,

 i tryed to use sosl query to get contacts related to email address

list<list<contacts>> conlist= [find :listofUniqueemail retrun all  contact (id, name , email ))];

issue in this query is listofUniqueemail  we cant use the set in soql query , its giving error unable to handle list.

can you please tel me how to fix this issue. your help is very needed to fix issue.
i tried https://www.codescience.com/blog/2017/salesforce-platform-encryption-the-good-the-bad-and-the-ugly-3-areas-to-review-closely link its not worked. please give me dirct solution


Hi Everyone,

My requirements is when I click back button on browser from VF page error should be thrown.And Previous page should not be viewed.

I Create a VF page with below Code 

apex:page Controller="ContactNomineeController" showHeader="True">
<apex:image value="{!$Resource.Contact}" width="500" height="100"/>
<apex:form >
            <apex:actionFunction action="{doquery}" name="QueryContact" reRender="MyContact"/>
            <div class="filterDiv">
            <label>Filter By Last Name:</label>
                       <apex:inputText value="{!serachstring}"  onkeyup="apexDoQuery()"/>
 <apex:pageBlock title="Search Contact" id="MyContact">
 <apex:pageBlockButtons >
 <apex:commandButton value="save" action="{!save}"/> 
 <apex:pageBlockTable value="{!ConList}" var="Con">
<apex:column value="{!Con.Name}"/>
  <apex:column value="{!Con.accountid}"/>
<apex:column headerValue="Email"> 
   <apex:inputField value="{!Con.email}" />
 <apex:column value="{!Con.phone}"/> 
  <apex:column headerValue="Nominee"> 
   <apex:inputCheckbox value="{!Con.Nominee__c}" />

and Controller Class 

public with sharing class ContactNomineeController {
 Public List<Contact> ConList {get;set;}
 Public List<Contact> Contacts {get;set;}
 Public String serachstring {get;set;}
 Public ContactNomineeController (){
  Public void doquery(){
 String querystring='';
 if (serachstring!= null)
 querystring = '%' +serachstring+ '%';
 ConList= [select id,accountid,name,email,phone,Nominee__C from Contact where lastname like :querystring LIMIT 10 ];
 Public void save() {
 update ConList; }

Code saved but not able to search contact.
Need help to understand the loophole.
Dear Team,
I want to know count the number of public group(s)(starts with P) an account is shared with. Can anyone please help us to creating a new trigger.
Let ‘say: In one account we have number of public group’s start with P. So we want to count the public groups which are start with P. The count will be populate field called as "PublicGroup_Count__c"
Hi Everyone,

I want to create Opportunity line item when I update Opportunity Stage to "Closed Won".

It works for when create new Opportunity but not works when I update an existing Opportunity.

It shows below error
FIELD_INTEGRITY_EXCEPTION, field integrity exception: PricebookEntryId (pricebook entry is in a different pricebook than the one assigned to the opportunity)
in 3rd line created list of ID's List<ID> ids, then in 5th line [SELECT Name FROM Account WHERE ID in :ids];  .i think parameter ids has null values then how can we query like ID IN :ids...please explain me what will exists in the parameter of 'ids' in 3rd line...
public class AccountQueryAction {
@InvocableMethod(label='Get Account Names' description='Returns the list of account names corresponding to the specified account IDs.')
public static List<String> getAccountNames(List<ID> ids) {
List<String> accountNames = new List<String>();
List<Account> accounts = [SELECT Name FROM Account WHERE Id in :ids];
for (Account account : accounts) {
return accountNames;
Hi all,

I have three record types with one page layout assigned to them.But the picklist values are different for all three record types.
When i log in as customer portal user,they are not able to see picklist values as defined for each record type.
I have created three profiles, three record types and assigned the picklist values as per the record type.
What can be the reason for picklist values not being visible to the portal user? Please help me. I need an urgent solution.

Thanks & Regards,
Amita Tatar

Is it possible to display custom button on section,here am trying to display one custom button on some seprate session on Account Page layout.

Thanks in Advance
   I am trying out the Closed Opportunity Trigger Challenge in Bulk  Apex Trigger Trailhead. I am getting the error : " System.QueryException: List has more than 1 row for assignment to SObject" when I perfomed the Execute Anonymous. Eventhough I could make the code more efficient, would like to know the cause of the error. Any help is appreciated and here is the code:

trigger ClosedOpportunityTrigger on Opportunity (after insert, after update) {
    try {
         List<Opportunity> Opps = [SELECT Id,StageName FROM Opportunity
          WHERE Id IN :Trigger.New];
   List<Task> tasks = new List<Task>();

    Task t = new Task();
        for(integer i=0; i<Opps.size(); i++) {
          if(Trigger.isInsert || Trigger.isUpdate) {
            if (Opps[i].StageName == 'Closed Won'){

                t.Subject = 'Follow Up Test Task';
                t.WhatId = Opps[i].Id;
    System.debug(tasks.size() + '  tasks size');
     if(tasks.size() > 0) {  
      insert tasks;
    }catch (DmlException e) {
        System.debug('A DML exception has occurred: ' +
Hi Everyone,

I having issue to create a new formula field in opportunity. 

When i was try to create a formula field in opportunity that to categorize the channels (Inbound,outbound,Agent or Carrier) using various objects (Profile,Username,Recordtype).

For example,if certain "Profile" users creating an opportunity i need to tag the field as "Inbound" or "Agents" or "Carrier". As well if any opportunity created under specfic record type need to tag the field as "Carrier".If certain users created opportunities need to tag as "Agents" or "Carrier".

I have created this below formula. But when check syntax it shows an error.

Is my formula logic is correct? If not how i can deal it to meet my requirement? Any help on this.

/* Categorize channel using Profile */
"Account Executive", "Outbound", 
"Commercial Bulk Executive", "Bulk", 
"Inbound Sales", "Inbound", 
"Outside Sales Agent", "Agent", 
"Sales Director/Manager", "Mgmt", 

 /* Categorize channel using owner name */
"Maria Martinez", "Agent",
"Michael Smith​","Carrier",
"Robert Johnson","Carrier",

/* Categorize channel using  recordtype */
if(RecordType.Name="Carrier Devices","Carrier","Other")

Thanks in advance.

I was creating a Partial Copy Sandbox. However the status says "Stopped" and there is nothing under "Action" for me to delete or refresh it. I cannot create any new sandboxes because this one is utilising the available spot, but cannot perform any actions on this either.
How do I delete this sandbox?

I have used one lookup field,  this will be a look-up field to users. Should use look up filter so that we are looking only users who have standard salesforce license 

How to use lookup filter for this logic?

Let me know your suggestion on this.

Hi -

We have a custom "Student Events" object that has a related list for Attendees. We'd like to be able to automatically create an Attendee record based on the creator when the record is created. I've tried using Process Builder to create an Attendee record for the contact record related to the user (CreatedBy.Contact.Id) but it fails:
The flow failed to access the value for myVariable_current.CreatedBy.Contact.Id because it hasn't been set or assigned.

All users in the system are also Contacts. Is what we're trying to do possible in Salesforce?

Hi All,

We have requirement as mentioend below senario:

How to create/generate a new Opportunity with Related Lists to be populated on new Opportunity from Old Opportunity based on the closure of  ContractEnd date  of a existing opportunity.

Can any one please help us to create a new trigger.

Thanks in Advance