• Pranav Chitrans
  • NEWBIE
  • 174 Points
  • Member since 2015


  • Chatter
    Feed
  • 3
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 61
    Replies
I I have two custom obj one is called Parent and the other Child..lookup relationship exists between the two obj..i want to count the child records for each parent and update it in a field named "ContactsCount"..I facing some exception error when tryin to insert Child records..below is the code
trigger ConCount on Child__c (after insert) {
Set <id> CHildIds = new set<id>();
List<Child__c> ChildList = new List<Child__c>();
List<Child__c> ListCon = new List<Child__c>();
List<Parent__c> ParentList = new List <Parent__c>();
List<Parent__c> ListParent = new List <Parent__c>();
Map<id,integer> ConMap = new map <id,integer>();
if(Trigger.isInsert){
    for(Child__c Chil : Trigger.New){
    CHildIds.add(Chil.Parentlookup__c);}   
    ParentList = [select id, name from Parent__c where id IN :CHildIds];
    ChildList = [select id,name , Parentlookup__c from Child__c where Parentlookup__c IN :CHildIds];
        for(Parent__c P :ParentList){
        Listcon.clear();
        for(Child__c C : ChildList){
        if(C.Parentlookup__c == P.id){
        ListCon.add(C);
         ConMap.put(P.id,ListCon.size());
         
         } }}
        if(ParentList.size()>0){
        for(Parent__c Pa : ParentList){
        if(ConMap.size()>0){
        Pa.ContactsCount__c = ConMap.get(Pa.id);
        ListParent.add(Pa);
        }}}
        if(ListParent.size()>0)
        update ListParent;
        }}

 
How to write a salesforce formula to convert the field Date_of_Withdrawal_String__c (text) field which has he data as "2017-04-30 00:00:00" into a Date field to show the date as 30/04/2017.
  • April 03, 2017
  • Like
  • 0
how to load the salesforce to salesforce
explain one scenario


wsdl  entrprise&wsdl partner
 
 
Hi,

I need one help for Cron Expression for sechduling my batch at certain interlval which would be a lighitning web component, and whatever period sleected in the drop down i will take that sync period as my parameter to calculate cron expression. My interval could be every 30 minute, hourly, daily. And the moment user click on custom sechdule button from LWC page from that time the calculation should start, not from the near by hours. For example user click on button at 18th July 2019 10:34 A.M and he seleted the interval from drop down as '30 Minutes' then the next sechdueld run should be 18th July 2019 11:04 A.M, not the 10:30 A.M because salesforce takes the near by hours by default which i did not wanted in my solution.

I have written the logic for hourly and daily which seems workin fine but i am ot sure too for that as well.
if(syncPeriod == 'Every 30 Minutes') {
	cronExpressionfromUI = '0 '+system.now().addMinutes(30).minute()+' * * * ?';
	
	cronExpressionfromUI = '0 10'+' *'+' *'+' *'+' ?';
	}
	else if(syncPeriod == 'Hourly') {
		cronExpressionfromUI = '0 '+system.now().minute()+' * * * ?';
	}
	else if(syncPeriod == 'Daily') {
		cronExpressionfromUI = '0 0 '+system.now().addHours(1).hour()+' *'+' *'+' ?';
	}
}
For the first condition( every 30 minute) i am facing an issue which are listed below :
  • If i use expression('0 '+system.now().addMinutes(30).minute()+' * * * ?') the it runs for the 1 st time but for the next run after completion of one it gets sechduled for 1 hour automatically.
  • If i use expression for 10 minute(for testing purpose) something like(cronExpressionfromUI = '0 10'+' *'+' *'+' *'+' ?';) then it always calculate from the near by hours not the moment from when button was clicked.
  • I do not want to run the system.sechdule multiple time as per my sync interval timing because that might hit governer limit.
I tried few other expression as well, but i wont help.
Please assist at earliest.

Thanks
Pranav
 
While uploading profile picture via logged in community I want to put a validation check file size should me less than 2 mb ans type should be of JPG/JPEG and so on..I tried but not geeting through it
File to add
<apex:inputFile value="{!blbImageBody }"   id="i_file"/>
Button
<apex:commandButton value="Save" styleClass="btn-success" style="margin-right: 5px;" 
                          html-data-loading-text="Saving..." action="{!upload}"  id="i_submit" 
                          onclick="$(this).button('loading')"/>
In this line i have to perform one more jquery method that checks the validation.Kindly help me over this issue ASAP.
I want to chnage the user community profile picture (The logged in user) and there are multiple user with different login and password.
I tried but it only change the admin login profile picture but while doing for community it shows and error while saving insufficient privilages.
global class profile 
{
    global String profileImageUrl { get; set; }
    List<user> lstuser;   
    global profile () 
    {
         lstuser = [select FullPhotoUrl from User where Id =: UserInfo.getUserId()];
         profileImageUrl=lstuser[0].FullPhotoUrl; 
    }
    
    global Document document 
    {
        get 
        {
          if (document == null)
          document = new Document();
          return document;
        }
        set;
     }

     public void upload() 
     {
       Blob b;  
       document.AuthorId = UserInfo.getUserId();
       document.FolderId = UserInfo.getUserId(); // put it in running user's folder
       try
       {
          document.type = 'jpg'; 
          document.IsPublic = true;
          //insert document;
         // ImageId = '06990000001HnuB';
          b = document.Body;
          //ConnectApi.ChatterUsers newPhoto = new ConnectApi.ChatterUsers();  
       } 
       catch (DMLException e) 
       {
          ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,'Error uploading file'));
       } 
       finally 
       {
          document.body = null; // clears the viewstate
          document = new Document();
       }
       ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'File uploaded successfully : '+b));
       String communityId = null;
       String userId= UserInfo.getUserId();
       // ID fileId = ImageId;
       // Set photo
       ConnectApi.Photo photo = ConnectApi.ChatterUsers.setPhoto(communityId, userId,new ConnectApi.BinaryInput(b,'image/jpg','userImage.jpg'));
    }
}
VISUAL FORCE COMPONENT(For header)
<apex:component controller="profile" >
   <html>
   <apex:attribute name="loginuser" type="String" description="LoginUser"/>
   <meta name="viewport" content="width=1050, initial-scale=1.0"/>
   <link href="{!URLFOR($Resource.bootStrap, 'bootstrap/css/bootstrap.min.css')}" rel="stylesheet" media="screen"/>   
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>


<body>
  <header>   
  
                         
         <div style="float:right;" width="20%">
            <p style="color:#ffffff;margin-left:-2px;margin-top: 9px;"><b>Welcome : {!LoginUser}</b></p>  
         </div>
         
          <div style="float:right;" width="15%">            
            <apex:outputLink onclick="window.open('https://ccc-infotech-developer-edition.ap1.force.com/FileUploadTimeLog','target=_parent','width=500,height=500'); return false;">
                 <apex:image id="profileImage" url="{!profileImageUrl}" style="height:39px;width:39px;border-radius:19px;margin-right:22px"/>
             </apex:outputLink>
         </div>
     </div> 
   
    
      
 </header>
 </body>
  </html>
</apex:component>

on click of profile photo there will be on new vf [page will be opened in which there will be an option to change the profile photo and after saving the profile pic should get chnaged.
 
<apex:page controller="profile" sidebar="false" showHeader="false">
  <apex:form enctype="multipart/form-data">
    <apex:pageMessages />
    <apex:pageBlock title="Upload Profile Photo">
      <apex:pageBlockButtons >
        <apex:commandButton action="{!upload}" value="Save"/>
      </apex:pageBlockButtons>

      <apex:pageBlockSection showHeader="false" columns="2" id="block1">
       <apex:pageBlockSectionItem >
          <apex:outputLabel value="File" for="file"/>
          <apex:inputFile value="{!document.body}" filename="{!document.name}" id="file"/>
        </apex:pageBlockSectionItem>
      </apex:pageBlockSection>

    </apex:pageBlock>
  </apex:form>
</apex:page>

 
I want to write test calss for the below trigger,Kindly help out in this ASAP
Also mention in detail that how many method is necesary in test class to measure 

Apex Trigger
trigger helper2UpdateContact on Account (after Insert, after Update) 
{
 updateContactHelper obj = new updateContactHelper();
 if(trigger.IsInsert && trigger.isAfter)
 {
  obj.onAfterInsert(trigger.New);
 }
 
 if(trigger.isUpdate && trigger.isAfter)
 {
 obj.onAfterUpdate(trigger.new,trigger.oldMap);
 }
}

Apex Class
public class updateContactHelper
{
 public void onAfterInsert(List<Account>triggerNew)
 {
  createContact(triggerNew);
 }
 
 public void onAfterUpdate(List<Account>triggerNew,Map<Id,Account>triggerOldMap)
 {
  updateContactField(triggerNew,triggerOldMap);
 }
 
 void createContact(List<Account>triggerNew)
 {
  List<Contact> lstCon = new List<Contact>();
  Set<Id> setAccId = new Set<Id>(); 
  for(Account acc : triggerNew)
  {
   setAccId.add(acc.Id);
   Contact con = new Contact();
   con.lastName = acc.Name;
   con.AccountId = acc.id;
   con.checkbox__c =acc.checkbox__c ;
   lstCon.add(con);
  }
  insert lstCon;
  
  Map<Id,Id> MapLookup = new Map<Id,Id>();
  for(Contact Con : [Select Name,AccountId from contact where AccountId =:setAccId])
  {
   MapLookup.put(con.AccountId,con.Id);
  }
  List<Account> updateAcc = new List<Account>();
  List<Account> loopAcc = new List<Account>([select id,Contact__c from Account where id =:setAccId]);
  for(Account AccNew: loopAcc)
  {
   
   if(MapLookup.CONTAINSKEY(AccNew.id) && AccNew.Contact__c == null)
   {
    Account AccContactFieldUpdate = new Account();
    AccContactFieldUpdate.id=AccNew.Id;
    AccContactFieldUpdate.Contact__c = MapLookup.get(AccNew .id);
    updateAcc .add(AccContactFieldUpdate);
   }
  }
  upsert updateAcc ;
 }
 
 void updateContactField(List<Account>triggerNew,Map<Id,Account>triggerOldMap)
 {
  map<Id,Account> mapAcc = new map<Id,Account>([Select (Select Id, LastName,checkbox__c from contacts) from Account where Id IN : triggerNew]);
  List<Contact> updateCon = new List<Contact>();
  for(Account updatedAcc : triggerNew)
  {
   Account oldAcc = triggerOldMap.get(updatedAcc.Id);
   if(mapAcc.ContainsKEY(updatedAcc.Id) && oldAcc.Name != updatedAcc.Name || oldAcc.checkbox__c != updatedAcc.checkbox__c )
   {
    for(Contact con :mapAcc.get(updatedAcc.Id).Contacts)
    {
     con.LastName = updatedAcc.Name;     
     con.checkbox__c = updatedAcc.checkbox__c;     
     updateCon.add(con);
    }   
   }
  }
  update updateCon;
 }
}

 
Hello everyone,
Please help me to ​Write a trigger on Opportunity line item when a line item deletes delete an opportuntiy as well.

Thank you
I have Write a trigger on Contact , when a contact insert an email should be sent to contact email id with specified template. I have written the code & it doesm't give any error but i am not getting my result... i want to wrtie with helper class... it woked fine for me with direct trigger...
****APEX TRIGGER*****
trigger helperSendEmailTOCon on Contact (after Insert, after Update) 
{
 helperClassSendEmailToCon obj = new helperClassSendEmailToCon();
 if(trigger.isInsert && trigger.isAfter)
 {
  obj.onAfterInsert(trigger.new);
 }
}
****APEX CLASS****
public class helperClassSendEmailToCon
{
 
 public void onAfterInsert(List<Contact> triggerNew)
 {
  InsertEmailOnContact(triggerNew);
 }
 
 void InsertEmailOnContact(List<Contact> triggerNew)
 {  
  EmailTemplate et = [select id from EmailTemplate where name =:'InsertContact'];
  List<Messaging.SingleEmailMessage> emails = new List<Messaging.SingleEmailMessage>();  
  for(Contact con : triggerNew)
  {
   if(con.email!=null)
   {
    Messaging.singleEmailMessage singleEmail = new Messaging.singleEmailMessage();
    List<String> sendTo = new List<String>();
    singleEMail.setCcAddresses(sendTo);
    singleEMail.setTargetObjectId(con.Id); 
    singleEmail.setTemplateId(et.Id);
    singleEmail.setSaveAsActivity(false);
    emails.add(singleEmail );
   }
  }
  messaging.sendEmail(emails); 
 } 
}

PLZ HELP ME WITH THIS CODE
 
User-added image
I am having doubt on highlighted area... I want to desgin this page somewhat like this.But I am not able to implement logic on few things :
1. On Add Product page there is one link with view filter on first pageblock and on clicking on link the number of text field and picklist multiplies, how can I  do this with js or jquery.. just give some code logic.
2. On second page block.. there is one refresh button.. how to implement that.. Is that a image or some glyphicon like we use in bootstrap and all.??? plz tell me the way that I can put thta to refresh the block.
3. On top of second pageblock there is alphabates are there... how can i put there in pageblock.. because there is no such attribute where I can put that A|B|C|D|E|F like this... plz tell me...

Thanks
Hello everyone, plz tell me how to write the test class for this trigger listed below..
trigger ConTest on Account(after insert,after Update)
{
 if(trigger.isInsert && trigger.isAfter)
 {
  List<Contact> lstCon = new List<Contact>();
  for(Account acc : trigger.new)
  {
   Contact con = new Contact();
   con.lastName=acc.Name;
   con.AccountId = acc.Id;
   lstCon.add(con);
  }
  insert(lstCon);
 }
 
 if(trigger.isUpdate && trigger.isAfter)
 {
  Map<Id,Account> mapACC = new Map<Id,Account>([select (select id,name from contacts) from account where id IN: trigger.new]);
  List<Contact> newCon = new List<Contact>();
  for(Account updatedAcc : trigger.New)
  {
   Account oldAcc = trigger.oldMap.get(updatedAcc.Id);
   if(mapACC.ContainsKEY(updatedAcc.Id) && oldAcc.Name != updatedAcc.Name)
   {
 for(Contact con : mapACC.get(updatedAcc.Id).contacts)
    {
     con.lastname = updatedAcc.Name;
     newCon.add(con);
    }
   }
  }
  update newCon;
 }
} 

Thanks in advance :)
plz help with this error... It perfectly works with the update scenario.. but when i insert any new account it throws error
ERROR : Apex trigger Pranav.CheckboxUpdate caused an unexpected exception, contact your administrator: Pranav.CheckboxUpdate: execution of BeforeInsert caused by: System.StringException: Invalid id: populate: Trigger.Pranav.CheckboxUpdate: line 8, column 1
trigger CheckboxUpdate on Account (before insert,after insert ,after update) 
{
 List<Contact> cnlist = new List<Contact>();
 if(trigger.isbefore && trigger.isInsert)
 {
  for(Account ac : trigger.new) 
  {
   ac.Contact_Custom_Lookup__c = ac.name;
  }
 }

 if(trigger.isInsert && trigger.isAfter)
 {
  for(account ac:trigger.new)
  {
   Contact c= new Contact();
   c.Accountid=ac.id;
   c.Lastname=ac.Name;
   c.Checkbox__c=ac.Checkbox__c;
   cnlist.add(c);
  }
  Insert cnlist;
 }
 if(trigger.isupdate)
 {
  for(account ac:trigger.new)
  {
   List<Contact> cn=[select id from contact Where accountid IN :trigger.new ];
   for(integer i=0;i<cn.size();i++)
   {
    cn[i].Checkbox__c=ac.Checkbox__c;
   } 
   cnlist.addall(cn);
  }      
  update cnlist;
 }
}

 
Actually I am having little query on trigger.OldMap functionality.. I had written one trigger... And I am clear with some concepts but having little doubt on :
for(Contact con : mapACC.get(updatedAcc.Id).contacts)
If I am removing ".contacts"(dot contacts) it shows error that "Loop must iterate over a collection type: Account". I want ot know what is the role of .contacts here...
some part of my code I am pasting to clear my instances that I had created for my trigger
if(trigger.isUpdate && trigger.isAfter)
 {
  Map<Id,Account> mapACC = new Map<Id,Account>(trigger.oldMap);
  List<Contact> newCon = new List<Contact>();
  for(Account updatedAcc : trigger.New)
  {
   Account oldAcc = trigger.oldMap.get(updatedAcc.Id);
   if(mapACC.ContainsKEY(updatedAcc.Id) && oldAcc.Name != updatedAcc.Name)
   {
    for(Contact con : mapACC.get(updatedAcc.Id).contacts)
    {
     con.LastName = updatedAcc.Name;
     newCon.add(con);
    }
   }
  }
  update newCon;
 }

 
Want to write a trigger in such a way that when ever A new accoutn is getting created the Lookup filed on acccount with named "Parent Account" should filled withe the account name...along with that create the contact with the same name of account name.. i had written the code.. in which after inserting Account ,Contact is getting created.. but how to perform th logic.. that with the same name.. Parent Account should Populated...
trigger insertContact on Account (after Insert, after Update) 
{
 if(trigger.isInsert && trigger.IsAfter)
 {
  List<Contact> lstCon = new List<Contact>();
  for(Account acc : trigger.New)
  {
   Contact con = new Contact();
   con.LastName = acc.Name;
   con.AccountId = acc.id;   
   lstCon.add(con);
  }
  insert lstCon;
 }
}

 
I wan to write trigger in such a way that when ever a new lead is created, with the same name i want to create another lead... In short.. I want to create the clone of lead... when new lead is getting created... plz help..
I want to write the trigger in such a way that when ever new lead is getting created it automatically sens email and also attch one pdf attchment to it... I written some logic.. which is working fine when ever new lead is created it send the email but wont be able to write the logic for attchment... I am confused.. from where i have to get the attchment.. because while inserting recors.. there is no such filed of attchment... it ony comes when i save the data"Notes and attachment"/...
trigger SendAttchmnt on Lead (before Insert,before update,after Insert) 
{
 if(trigger.isInsert || trigger.isUpdate)
 {
  for(Lead l : trigger.New)
  {  
   if(l.email == null)
   {
   l.addError('Email Req');
   }
  }
 }
 
 if(trigger.isInsert && trigger.isAfter)
 {
  List<Messaging.SingleEmailMessage> mailList = new List<Messaging.SingleEmailMessage>();
  for(Lead ld : trigger.New)
  {
   if(ld.Email != null)
   {   
    Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
    List<String> toAddresses = new List<String>();
    toAddresses.add(ld.Email);
    email.setToAddresses(toAddresses);
    email.setSubject('Lead generated!');
    String message = '<html><body>Hi ' +ld.name + ', <br/>Lead Created '+'You are now customer of our group.<br/><br/> <b>Regards,</b><br/> Admin </body>  </html>';
    email.setHtmlBody(message);
    mailList.add(email);          
   //Messaging.sendEmail(new Messaging.SingleEmailMessage[]{email});
   }   
  }
  Messaging.sendEmail(mailList);   
  
  List<Messaging.Emailfileattachment> fileAttachments = new List<Messaging.Emailfileattachment>(); 
 }
}

​i had wriiten half the code of attachment but I got confused..so i left there,,..a dn one mor thing which i face the problem in line 26 in the body tag Hi, after that it shows Null (Hi Null,) why the name is not getting in email....
I am having scenario some thing like this.. I wanrt to fire trigger on insert if salary less than 1000 and in update salary must be greater than 1300...BUT..BUT BUT.... main thing... during update i dont want to fire the update trigger record when the salary amount does not chnages.. it only get fired when  during update the salary amount is being changed..During update if i changes or updates any other field, except salary the before update trigger should not fire ... I done some something like this.. before insert is correct but i am having problem in before update... that when i changes the salary then only it shoul fire.. if old value != new value then fire the trigger
trigger salaryCheck on Teacher__c (before Insert, before Update) 
{
 for(Teacher__c tch : trigger.New)
 {
  if(trigger.isInsert && tch.Salary__c < 1000)
  {
   tch.addError('Must be greater than 1000');
  }
 }
 
 List<Teacher__c> oldlstTch = new List<Teacher__c>(trigger.old);
 for(Teacher__c newLstTch : trigger.new)
 {
  if(trigger.isUpdate &&  newLstTch.Salary__c != oldlstTch.Salary__c  )
  {
    if(newLstTch.Salary__c == null ||newLstTch.Salary__c < 1300)
      {
       newLstTch.Salary__c.addError('can not be null and greater than 1300');
      }
  }
 }
}
Error : Compile Error: Initial term of field expression must be a concrete SObject: List<Teacher__c> at line 14 column 50
 
Actually I want to send the Automated birthday email notification whose birthdate is excactly equal to system. today() day and month. suppose i am having one custoom object named client and under that object there is custom field named Date Of Birth and email...and what i want is I want to schedule this every day and if the d.o.b filed data in exsisting record in client object day and month is equal to system.today() day and month then send the email to that all that records whose birthdate is today and also send email to that one more client whose email i had put it by hard coding.. i had used this logic.. but failed.. I checked on apex job it shows error email is null.... i hope you all understand... what I am trying to do..plz help
global class sendGreetingWishes implements Database.Batchable<sObject>
{
 string query;
 global Database.querylocator start(Database.BatchableContext bc)
 {
  String query= 'SELECT Id, Name, email__c,birthday__c FROM stud__c';
  return Database.getQueryLocator(query);
 }

global void execute(Database.BatchableContext bc, List<stud__c> scope)
{
 for(stud__c iteratorUser : scope)
 {
   date thisdate=system.today();
   integer sysday=thisdate.day();
   integer sysmonth=thisdate.month();
   string dayandmonth=sysday+'/'+sysmonth;
   Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
   List<String> toAddresses = new List<String>();
   toAddresses.add(iteratorUser.email__c);
   email.setToAddresses(toAddresses);
   List<String> ccAddresses = new List<String>();
   ccAddresses.add('pranavlakshya009@gmail.com');
   email.setCcAddresses(ccAddresses);
   email.setSubject('Happy Birthday. Have a blast — Birthday Reminder!');
   String message = 'Happy Birthday';
   email.setHtmlBody(message);
   Messaging.sendEmail(new Messaging.SingleEmailMessage[]{email});
 }
}

 global void finish(Database.batchableContext bc)
 {
 }
}

 
I am having 2 scenario something like this :
1. I have created one custom field named "lookup realtion" on standard object Account.. I want to fire trigger in such a way that when ever new account is inserted with the same name contact is being created and the custom field on Account which i have created should get populated with the contact name. and 
2. is on the account and contact I had created the custom field named "Checkbox" which is of checkbox type... and while insertion if account checkbox is checked the checkbox field on contact  should also be get checked and later on when i uncheck the checkbox on account the contact field checkbox also be get unchecked. I had written the code which perfectly well for creating the contact when ever new account is being created.. but I am facing problem in implementin these two above mentioned logics.. plz edit my code and suggest me your innovative Ideas..
public class CreateAccountContact 
{
 trigger CreateAccountContact on Account (after insert, after update){

if(Trigger.isInsert){

    List<Contact> ct = new List <Contact>();   
    for(Account acc : trigger.new){    
        Contact c = new Contact();       
                    c.LastName = acc.name;
                    c.AccountId=acc.id;
                    c.Fax=acc.Fax;
                    c.MailingStreet=acc.BillingStreet;
                    c.MailingCity=acc.BillingCity;
                    c.MailingState=acc.BillingState;              
                    c.MailingPostalCode=acc.BillingPostalCode;
                    c.MailingCountry=acc.BillingCountry;
                    c.Phone=acc.Phone;        
        ct.add(c);      
    }
   
    insert ct; 
}
}
}
Actually I want to perform the task in which if i select vale = this month from the pick list field Named " Status" and when i select date from the field named "Approval Date" then the month & year which is formula filed should print the same month and year and if select (next month) then month & year populated to +1 month and year +1 when onth is december... like same if i select (Nect to next month) the month & year field populated to +2 month .... below is the code which tried... it works well for conditon( THIS MONTH and NEXT MONTH) but i am facing problem in NEXT TO NEXT MONTH in the month of october november and december... plz help
IF(ISPICKVAL( Status__c ,"This Month"),
 CASE( MONTH( Approval_Date__c ) ,
1, "January"&" "&TEXT(YEAR( Approval_Date__c )), 
2, "February"&" "&TEXT(YEAR( Approval_Date__c )),
3, "March"&" "&TEXT(YEAR( Approval_Date__c )),
4, "April"&" "&TEXT(YEAR( Approval_Date__c )),
5, "May"&" "&TEXT(YEAR( Approval_Date__c )),
6, "June"&" "&TEXT(YEAR( Approval_Date__c )),
7, "July"&" "&TEXT(YEAR( Approval_Date__c )),
8, "August"&" "&TEXT(YEAR( Approval_Date__c )),
9, "September"&" "&TEXT(YEAR( Approval_Date__c )),
10, "October"&" "&TEXT(YEAR( Approval_Date__c )),
11, "November"&" "&TEXT(YEAR( Approval_Date__c )),
12, "December"&" "&TEXT(YEAR( Approval_Date__c )),"none"),

IF(ISPICKVAL( Status__c ,"Next Month"),
 CASE( MONTH( Approval_Date__c )+1,
1, "January"&" "&TEXT(YEAR( Approval_Date__c )), 
2, "February"&" "&TEXT(YEAR( Approval_Date__c )),
3, "March"&" "&TEXT(YEAR( Approval_Date__c )),
4, "April"&" "&TEXT(YEAR( Approval_Date__c )),
5, "May"&" "&TEXT(YEAR( Approval_Date__c )),
6, "June"&" "&TEXT(YEAR( Approval_Date__c )),
7, "July"&" "&TEXT(YEAR( Approval_Date__c )),
8, "August"&" "&TEXT(YEAR( Approval_Date__c )),
9, "September"&" "&TEXT(YEAR( Approval_Date__c )),
10, "October"&" "&TEXT(YEAR( Approval_Date__c )),
11, "November"&" "&TEXT(YEAR( Approval_Date__c )),
12, "December","January"&" "&TEXT(YEAR( Approval_Date__c )+1)) ,

IF(ISPICKVAL( Status__c ,"Next to Next Month"),
 CASE( MONTH( Approval_Date__c )+2,
1, "January"&" "&TEXT(YEAR( Approval_Date__c )), 
2, "February"&" "&TEXT(YEAR( Approval_Date__c )),
3, "March"&" "&TEXT(YEAR( Approval_Date__c )),
4, "April"&" "&TEXT(YEAR( Approval_Date__c )),
5, "May"&" "&TEXT(YEAR( Approval_Date__c )),
6, "June"&" "&TEXT(YEAR( Approval_Date__c )),
7, "July"&" "&TEXT(YEAR( Approval_Date__c )),
8, "August"&" "&TEXT(YEAR( Approval_Date__c )),
9, "September"&" "&TEXT(YEAR( Approval_Date__c )),
10, "October"&" "&TEXT(YEAR( Approval_Date__c )),
11, "November"&" "&TEXT(YEAR( Approval_Date__c )+1)+
CASE( MONTH( Approval_Date__c ),
12,"jan","feb"&" "&TEXT(YEAR( Approval_Date__c )+1))) ,null)))

 Error: Incorrect number of parameters for function 'CASE()'. Expected 22, received 23
hi gyus... This code is working fine..when ever I insert or update record it sends email.. but I am quite confused  so plz explain me the use of line 16,line 19,line 25 & what is the use of flag... and tell me that is messaging.singleEmailMessage is defined keyword...??
Last but not the least I want to edit the code in such a way that if i insert the data with dataloader where there is more than one contact then send email to more than one contact is inserted at a time....

************apex class**********
public with sharing class HelperContactTrigger {
    public static List<Contact> sendEmail(List<Contact>Contacts)
    {
     //query on template object
        EmailTemplate et=[Select id from EmailTemplate where name=:'Sales: New Customer Email'];

        //list of emails
        List<Messaging.SingleEmailMessage> emails = new List<Messaging.SingleEmailMessage>();   
        
        for(Contact con : Contacts)
        {
          //check for Account
            if(con.AccountId != null && con.Email != null){

                //initiallize messaging method
                Messaging.SingleEmailMessage singleMail = new Messaging.SingleEmailMessage();

                //set object Id
                singleMail.setTargetObjectId(con.Id);

                //set template Id
                singleMail.setTemplateId(et.Id);

                //flag to false to stop inserting activity history
                singleMail.setSaveAsActivity(false);

                //add mail
                emails.add(singleMail);
            }
        }
            //send mail
        Messaging.sendEmail(emails);

        return Contacts;          
        
    }

    public static List<Contact> sendEmailafter(List<Contact>Contacts)
    {
    //query on template object
        EmailTemplate et=[Select id from EmailTemplate where name=:'Sales: New Customer Email'];

        //list of emails
        List<Messaging.SingleEmailMessage> emails = new List<Messaging.SingleEmailMessage>();   
        
        for(Contact con : Contacts)
        {
          //check for Account
            if(con.AccountId != null && con.Email != null){

                //initiallize messaging method
                Messaging.SingleEmailMessage singleMail = new Messaging.SingleEmailMessage();

                //set object Id
                singleMail.setTargetObjectId(con.Id);

                //set template Id
                singleMail.setTemplateId(et.Id);

                //flag to false to stop inserting activity history
                singleMail.setSaveAsActivity(false);

                //add mail
                emails.add(singleMail);
            }
         }
            //send mail
        Messaging.sendEmail(emails);

        return Contacts;          
        }
    }

*********Apex trigger********
trigger SendEmailToAccount on Contact (after insert,after update) 
{
    if(Trigger.isAfter)
    {
        if(Trigger.isInsert )
        { 
            //helper class for single email but bulk messages
            HelperContactTrigger.sendEmail(trigger.new);
        }
    }
        if(trigger.isAfter && trigger.isUpdate )
        {           
         HelperContactTrigger.sendEmailafter(trigger.new);
        }
}

 
Hello guys..plz help
Error: Compile Error: Invalid field AccountId for SObject Contact__c at line 62 column 32
I had created the Account and contact As a custom object on seperate app.so dont get cnfused. I also mentioned the line 62 in apex class..wher i am getting error..
***APEX Class****
public class fees
{
public void onBeforeInsert(list<Contact__c>triggerNew)
 {
  feesCheckInsert(triggerNew);
 }
  
 public void onBeforeUpdate(list<Contact__c>triggerNew,map<Id,Contact__c>triggerOldMap)
 {
  feesCheckUpdate(triggerNew);
  feesCheckOnChange(triggerNew,triggerOldMap);
 }
 
 public void onAfterInsert(list<Contact__c>triggerNew)
 {
  manageContactFees(triggerNew);
 }
 
 void feesCheckInsert(list<Contact__c>triggerNew)
 {
  for(Contact__c f : triggerNew )   
  {
   if(f.Fees__c ==null || f.Fees__c<1000)
   {
    f.Fees__c.addError('Cannot be NULL and greater than 1000 ');
   }
  }  
 }
 
 void feesCheckUpdate(list<Contact__c>triggerNew)
 {
  for(Contact__c f : triggerNew )   
  {
   if(f.Fees__c == null)
   {
    f.Fees__c.addError('can not be null');
   }
  }  
 }
 
 void feesCheckOnChange(list<Contact__c>triggerNew,map<Id,Contact__c>triggerOldMap)
 {
  for(Contact__c f : triggerNew )   
  {
   if(f.Fees__c !=Null && f.Fees__c!=triggerOldMap.get(f.Id).Fees__c)
   {
    f.Fees__c.addError('Cannot chnage the value');
   }
  }  
 }
 
 void manageContactFees(list<Contact__c> triggerNew)
 {
    list<Account__c> lstAcc = new list<Account__c>();
    map<Id,list<Contact__c>> mapAccIdToContact = new map<Id,list<contact__c>>();
    for(Contact__c f : triggerNew)
    {
     if(f.AccountId != null)
     {
        if(mapAccIdToContact.get(f.AccountId)== null)
        {
         mapAccIdToContact.put(f.AccountId,new list<Contact__c>());
        }   
        mapAccIdToContact.get(f.AccountId).add(f);      
     }
    }
    if(mapAccIdToContact.size() > 0)
    {
     for(Account__c f : [select Id,Total_Fees__c from Account__c where Id in : mapAccIdToContact.keySet()])
     {
       double dblTotalFees = 0;
                list<Contact__c> lstCon = mapAccIdToContact.get(f.Id);
                for(Contact__c objC : lstCon)
                {
                    if(objC.Fees__c == null)
                    {
                        objC.Fees__c = 0;
                    }
                    dblTotalFees += objC.Fees__c;
                }
                
                if(f.Total_Fees__c == null)
                {
                    f.Total_Fees__c = 0;
                }
                
                f.Total_Fees__c += dblTotalFees;
                
                lstAcc.add(f);
     }
     if(lstAcc.size() > 0)
     {
       update lstAcc;
     }
    }
 } 
}
****APEX Trigger****
trigger FeesCheck1 on Contact__c(before Insert, before Update, after Insert)
{
 fees FeesHelper = new fees();
 if(trigger.isInsert && trigger.Isbefore)
 {
    FeesHelper.onBeforeInsert(trigger.New);

 }
  if(trigger.isUpdate && trigger.Isbefore)
 {
    FeesHelper.onBeforeUpdate(trigger.New,trigger.OldMap);
 }
 if(trigger.isInsert && trigger.isAfter)
 {
  FeesHelper.onAfterInsert(trigger.New);
 }
}

 
Can anyone plz tell what is the error.. I totaaly got pissed now... it shows error
Error: Compile Error: unexpected token: '{' at line 11 column 4
trigger feesCheck on Test__c (before insert, before update) 
{
  for(Test__c f : trigger.new)
  {
    if(trigger.isInsert && f.Fees__c < 1000)
    {
     f.addError('incorrect data 1000');
    }
    
 else(trigger.isUpdate && f.Fees__<1500 )
    {
      
     f.addError('greater than 1500');
    
     }
  
  }
  
}

 
I am having 2 scenario something like this :
1. I have created one custom field named "lookup realtion" on standard object Account.. I want to fire trigger in such a way that when ever new account is inserted with the same name contact is being created and the custom field on Account which i have created should get populated with the contact name. and 
2. is on the account and contact I had created the custom field named "Checkbox" which is of checkbox type... and while insertion if account checkbox is checked the checkbox field on contact  should also be get checked and later on when i uncheck the checkbox on account the contact field checkbox also be get unchecked. I had written the code which perfectly well for creating the contact when ever new account is being created.. but I am facing problem in implementin these two above mentioned logics.. plz edit my code and suggest me your innovative Ideas..
public class CreateAccountContact 
{
 trigger CreateAccountContact on Account (after insert, after update){

if(Trigger.isInsert){

    List<Contact> ct = new List <Contact>();   
    for(Account acc : trigger.new){    
        Contact c = new Contact();       
                    c.LastName = acc.name;
                    c.AccountId=acc.id;
                    c.Fax=acc.Fax;
                    c.MailingStreet=acc.BillingStreet;
                    c.MailingCity=acc.BillingCity;
                    c.MailingState=acc.BillingState;              
                    c.MailingPostalCode=acc.BillingPostalCode;
                    c.MailingCountry=acc.BillingCountry;
                    c.Phone=acc.Phone;        
        ct.add(c);      
    }
   
    insert ct; 
}
}
}
hi gyus... This code is working fine..when ever I insert or update record it sends email.. but I am quite confused  so plz explain me the use of line 16,line 19,line 25 & what is the use of flag... and tell me that is messaging.singleEmailMessage is defined keyword...??
Last but not the least I want to edit the code in such a way that if i insert the data with dataloader where there is more than one contact then send email to more than one contact is inserted at a time....

************apex class**********
public with sharing class HelperContactTrigger {
    public static List<Contact> sendEmail(List<Contact>Contacts)
    {
     //query on template object
        EmailTemplate et=[Select id from EmailTemplate where name=:'Sales: New Customer Email'];

        //list of emails
        List<Messaging.SingleEmailMessage> emails = new List<Messaging.SingleEmailMessage>();   
        
        for(Contact con : Contacts)
        {
          //check for Account
            if(con.AccountId != null && con.Email != null){

                //initiallize messaging method
                Messaging.SingleEmailMessage singleMail = new Messaging.SingleEmailMessage();

                //set object Id
                singleMail.setTargetObjectId(con.Id);

                //set template Id
                singleMail.setTemplateId(et.Id);

                //flag to false to stop inserting activity history
                singleMail.setSaveAsActivity(false);

                //add mail
                emails.add(singleMail);
            }
        }
            //send mail
        Messaging.sendEmail(emails);

        return Contacts;          
        
    }

    public static List<Contact> sendEmailafter(List<Contact>Contacts)
    {
    //query on template object
        EmailTemplate et=[Select id from EmailTemplate where name=:'Sales: New Customer Email'];

        //list of emails
        List<Messaging.SingleEmailMessage> emails = new List<Messaging.SingleEmailMessage>();   
        
        for(Contact con : Contacts)
        {
          //check for Account
            if(con.AccountId != null && con.Email != null){

                //initiallize messaging method
                Messaging.SingleEmailMessage singleMail = new Messaging.SingleEmailMessage();

                //set object Id
                singleMail.setTargetObjectId(con.Id);

                //set template Id
                singleMail.setTemplateId(et.Id);

                //flag to false to stop inserting activity history
                singleMail.setSaveAsActivity(false);

                //add mail
                emails.add(singleMail);
            }
         }
            //send mail
        Messaging.sendEmail(emails);

        return Contacts;          
        }
    }

*********Apex trigger********
trigger SendEmailToAccount on Contact (after insert,after update) 
{
    if(Trigger.isAfter)
    {
        if(Trigger.isInsert )
        { 
            //helper class for single email but bulk messages
            HelperContactTrigger.sendEmail(trigger.new);
        }
    }
        if(trigger.isAfter && trigger.isUpdate )
        {           
         HelperContactTrigger.sendEmailafter(trigger.new);
        }
}

 
Hi,

I need one help for Cron Expression for sechduling my batch at certain interlval which would be a lighitning web component, and whatever period sleected in the drop down i will take that sync period as my parameter to calculate cron expression. My interval could be every 30 minute, hourly, daily. And the moment user click on custom sechdule button from LWC page from that time the calculation should start, not from the near by hours. For example user click on button at 18th July 2019 10:34 A.M and he seleted the interval from drop down as '30 Minutes' then the next sechdueld run should be 18th July 2019 11:04 A.M, not the 10:30 A.M because salesforce takes the near by hours by default which i did not wanted in my solution.

I have written the logic for hourly and daily which seems workin fine but i am ot sure too for that as well.
if(syncPeriod == 'Every 30 Minutes') {
	cronExpressionfromUI = '0 '+system.now().addMinutes(30).minute()+' * * * ?';
	
	cronExpressionfromUI = '0 10'+' *'+' *'+' *'+' ?';
	}
	else if(syncPeriod == 'Hourly') {
		cronExpressionfromUI = '0 '+system.now().minute()+' * * * ?';
	}
	else if(syncPeriod == 'Daily') {
		cronExpressionfromUI = '0 0 '+system.now().addHours(1).hour()+' *'+' *'+' ?';
	}
}
For the first condition( every 30 minute) i am facing an issue which are listed below :
  • If i use expression('0 '+system.now().addMinutes(30).minute()+' * * * ?') the it runs for the 1 st time but for the next run after completion of one it gets sechduled for 1 hour automatically.
  • If i use expression for 10 minute(for testing purpose) something like(cronExpressionfromUI = '0 10'+' *'+' *'+' *'+' ?';) then it always calculate from the near by hours not the moment from when button was clicked.
  • I do not want to run the system.sechdule multiple time as per my sync interval timing because that might hit governer limit.
I tried few other expression as well, but i wont help.
Please assist at earliest.

Thanks
Pranav
 
I don't have previous experience with Apex Code. I created an apex class that converts the Lead to Account and I write a simple test. With the current status my code coverage is 44% and I need at least 75% in order to deploy it in production. Can someone help me write that ?


Apex Class
Public class AutoConvertLeads
{
    @InvocableMethod
    public static void LeadAssign(List<Id> LeadIds)
    {
        
        List<Database.LeadConvert> MassLeadconvert = new List<Database.LeadConvert>();
        for(id currentlead: LeadIds){
                Database.LeadConvert Leadconvert = new Database.LeadConvert();
                Leadconvert.setLeadId(currentlead);                
                Leadconvert.setConvertedStatus('Qualified');
                MassLeadconvert.add(Leadconvert);
        }
        
        
        if (!MassLeadconvert.isEmpty()) {
            List<Database.LeadConvertResult> lcr = Database.convertLead(MassLeadconvert);
        }
    }
}
Test Class
@isTest
private class AutoConvertLeads_Test{
  static testMethod void test_LeadAssign_UseCase1(){
    AutoConvertLeads obj01 = new AutoConvertLeads();
    AutoConvertLeads.LeadAssign(new List<Id>());
  }

}


 
I have two related custom objects. I'll name them:
"Custom_Object1__c"
and 
"Custom_Object2__c".

In the "Custom_Object2__c" I have a lookup field to "Custom_Object1__c". In "Custom_Object1__c" I have a related list with "Custom_Object2__c".
In "Custom_Object2__c" I also have a checkbox field. When changing the state of the checkbox I need in the "Custom_Object2__c" trigger to get all checked "Custom_Object2__c" records of "Custom_Object1__c".

I've implemented a code in the trigger and I'm trying to get all checked "Custom_Object2__c" records via the following query:[SELECT checkbox__c, Custom_Object2_Status__c, Id FROM Custom_Object1__c where id =:Custom_Object1_ID__c]

The issue I have is that the query returns old data which is before the update of the record.

For instance I have four out of 4 checked Custom_Object2__c records but in the trigger the query returns 3 instead of 4 checked.

How can I get the actual data?
hii,
   Am getting this error while creating suggestion box,but all fields types are correct only,don't know why its throwing this error
  Please help me to solve this.

Thanks in advance
Account and Contact has the lookup relationship. Now i want the rollup kind type of field in the Account page where i can show the count of my all contacts. I cannot change the relationship from Lookup to master- Detail.

How i will achieve this in the Account page in lookup relationship ?
I I have two custom obj one is called Parent and the other Child..lookup relationship exists between the two obj..i want to count the child records for each parent and update it in a field named "ContactsCount"..I facing some exception error when tryin to insert Child records..below is the code
trigger ConCount on Child__c (after insert) {
Set <id> CHildIds = new set<id>();
List<Child__c> ChildList = new List<Child__c>();
List<Child__c> ListCon = new List<Child__c>();
List<Parent__c> ParentList = new List <Parent__c>();
List<Parent__c> ListParent = new List <Parent__c>();
Map<id,integer> ConMap = new map <id,integer>();
if(Trigger.isInsert){
    for(Child__c Chil : Trigger.New){
    CHildIds.add(Chil.Parentlookup__c);}   
    ParentList = [select id, name from Parent__c where id IN :CHildIds];
    ChildList = [select id,name , Parentlookup__c from Child__c where Parentlookup__c IN :CHildIds];
        for(Parent__c P :ParentList){
        Listcon.clear();
        for(Child__c C : ChildList){
        if(C.Parentlookup__c == P.id){
        ListCon.add(C);
         ConMap.put(P.id,ListCon.size());
         
         } }}
        if(ParentList.size()>0){
        for(Parent__c Pa : ParentList){
        if(ConMap.size()>0){
        Pa.ContactsCount__c = ConMap.get(Pa.id);
        ListParent.add(Pa);
        }}}
        if(ListParent.size()>0)
        update ListParent;
        }}

 
I want to use place holder for date picker me using ui:inputdate
Hi All , I am facing an issue while deleting  picklist values in bulk . It is taking too  much time to delete single picklist value and if try to delete by opening in new tab it is throwing me error : There's another picklist operation in progress for this object. Try your change again later.

Can anyone please help me out as we have release this weekend and we need to deploy these picklist values after deleting few values (I need to delete almost 200 picklist values )

Thanks,
Bharat
Hi all,

Could anyone help me to matching the field with two different objects
1.I Have two objects 1.Case 2.custom object Integration__c.here i'm tring to get
the matching the some fields of both objects.

2.Case object fields for matching AccountName and IntegrationTo__c and Integration__c object fields are account__c,integrationwith__c.

3.if the both object fields are matching then get the record details from Integration__c custom object.
for that i have developed a trigger as after insert on Case object.

trigger IntegrationType on Case (after Insert) {
List<ID> cIds = new List<ID>(); //List<Integration__c> integ = new List<Integration__c>();
for(Case cObj : Trigger.new){
if(cObj.Account.Name != null && cObj.IntegrationTo__c != null){
cIds.add(cObj.Id); //add case ids.
}
}
List<Integration__c> ll = [SELECT id,name,username__c,password__c,URL__c,account__c,integrationwith__c FROM Integration__c WHERE Id=:cIds];
for(Integration__c lst : ll){
if(!cIds.isEmpty()){

//help me here how to match the fields

String uname = lst.username__c;
String pwd= lst.password__c;
String url= lst.URL__c;
System.debug('Username :' +uname);
System.debug('Username :' +pwd);
System.debug('Username :' +url);
}
}
}
How to write a salesforce formula to convert the field Date_of_Withdrawal_String__c (text) field which has he data as "2017-04-30 00:00:00" into a Date field to show the date as 30/04/2017.
  • April 03, 2017
  • Like
  • 0
I get this error: Challenge Not yet complete... here's what's wrong: 
The Suggestion custom object does not contain the correct set of custom fields. Tip: check for typos in the field names.

I've followed all steps, went back and rechecked, and then redid the entire challenge. I can't get it to pass. What am I doing wrong? I have included all custom fields and spelled them correctly.
While uploading profile picture via logged in community I want to put a validation check file size should me less than 2 mb ans type should be of JPG/JPEG and so on..I tried but not geeting through it
File to add
<apex:inputFile value="{!blbImageBody }"   id="i_file"/>
Button
<apex:commandButton value="Save" styleClass="btn-success" style="margin-right: 5px;" 
                          html-data-loading-text="Saving..." action="{!upload}"  id="i_submit" 
                          onclick="$(this).button('loading')"/>
In this line i have to perform one more jquery method that checks the validation.Kindly help me over this issue ASAP.
hi gyus... This code is working fine..when ever I insert or update record it sends email.. but I am quite confused  so plz explain me the use of line 16,line 19,line 25 & what is the use of flag... and tell me that is messaging.singleEmailMessage is defined keyword...??
Last but not the least I want to edit the code in such a way that if i insert the data with dataloader where there is more than one contact then send email to more than one contact is inserted at a time....

************apex class**********
public with sharing class HelperContactTrigger {
    public static List<Contact> sendEmail(List<Contact>Contacts)
    {
     //query on template object
        EmailTemplate et=[Select id from EmailTemplate where name=:'Sales: New Customer Email'];

        //list of emails
        List<Messaging.SingleEmailMessage> emails = new List<Messaging.SingleEmailMessage>();   
        
        for(Contact con : Contacts)
        {
          //check for Account
            if(con.AccountId != null && con.Email != null){

                //initiallize messaging method
                Messaging.SingleEmailMessage singleMail = new Messaging.SingleEmailMessage();

                //set object Id
                singleMail.setTargetObjectId(con.Id);

                //set template Id
                singleMail.setTemplateId(et.Id);

                //flag to false to stop inserting activity history
                singleMail.setSaveAsActivity(false);

                //add mail
                emails.add(singleMail);
            }
        }
            //send mail
        Messaging.sendEmail(emails);

        return Contacts;          
        
    }

    public static List<Contact> sendEmailafter(List<Contact>Contacts)
    {
    //query on template object
        EmailTemplate et=[Select id from EmailTemplate where name=:'Sales: New Customer Email'];

        //list of emails
        List<Messaging.SingleEmailMessage> emails = new List<Messaging.SingleEmailMessage>();   
        
        for(Contact con : Contacts)
        {
          //check for Account
            if(con.AccountId != null && con.Email != null){

                //initiallize messaging method
                Messaging.SingleEmailMessage singleMail = new Messaging.SingleEmailMessage();

                //set object Id
                singleMail.setTargetObjectId(con.Id);

                //set template Id
                singleMail.setTemplateId(et.Id);

                //flag to false to stop inserting activity history
                singleMail.setSaveAsActivity(false);

                //add mail
                emails.add(singleMail);
            }
         }
            //send mail
        Messaging.sendEmail(emails);

        return Contacts;          
        }
    }

*********Apex trigger********
trigger SendEmailToAccount on Contact (after insert,after update) 
{
    if(Trigger.isAfter)
    {
        if(Trigger.isInsert )
        { 
            //helper class for single email but bulk messages
            HelperContactTrigger.sendEmail(trigger.new);
        }
    }
        if(trigger.isAfter && trigger.isUpdate )
        {           
         HelperContactTrigger.sendEmailafter(trigger.new);
        }
}

 
Hi, this is related to my earlier post here

I have a fairly large test method that gives me 90% test coverage in sandbox with no problems, but then when I try to migrate it to production, I’m suddenly getting an external entry point error on the last line. I talked to my co-worker and she says it’s because there is some inconsistency between sandbox and production, but I can’t seem to figure out how to fix it. I checked all the validation rules and things like that and can’t find any inconsistencies.

Has anyone come across this before? When something works well in sandbox but then you have this sort of trouble getting it into production?
  • March 29, 2010
  • Like
  • 0