• Temple Sutfin
  • NEWBIE
  • 25 Points
  • Member since 2012
  • Vice President of Development
  • Trident Contract Management

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 12
    Replies

I created record types on the opportunity object, and had to subsequently create a Sales Process too.  Now that I have everything the way that I want it, when I try to migrate it from a sandbox into production, I get the same error no matter what. 
"Opportunity.Flip : Required field is missing: businessProcess"
 

I get this error for each of my record types.  I can't find anything online to explain this.  Anyone have an idea (that does not involve change sets?)

Thanks in advance

I have an approval process with four approval steps.
Each step, on approval, updates a checkbox that is evaluated in visualforce email alert.  However, despite the order listed in the approval process between step 2 and step 3 being exactly the same, the order in which salesforce is evaluating the two steps is different.  Here is the entire process laid out:

pprover 1 approves
   A box is checked that approver 1 approved
   A picklist is updated (used in a VF page elsewhere, and works just fine)
   An email is sent to approver 2 with specific language (This is a VF template that looks at the box checked above and renders the section appropriate to that approver)

Approver 2 approves
   A box is checked that approver 2 approved
   A picklist is updated (used in a VF page elsewhere, and works just fine)
   An email is sent to approver 3 with specific language (This is a VF template that looks at the box checked above and renders the section appropriate to that approver)

Approver 3 approves
   A box is checked that approver 3 approved
   A picklist is updated (used in a VF page elsewhere, and works just fine)
   An email is sent to approver 4 with specific language (This is a VF template that looks at the box checked above and renders the section appropriate to that approver)

And here is where it breaks down.  The Approver 3 approval steps try to send the email BEFORE the box is checked, so the email template is sending the wrong rendered section.  If I manually check approver 1,2, and 3's boxes and then submit for approval, it works just fine.  So I know that salesforce is checking the boxes before sending the email alerts for the first 2 steps.  But on the third step, it sends the email and then checks the box.  But each approval step is exactly the same.

Anyone come across this issue before?  What did you do to solve it?  Any suggestions are helpful here.

Thanks,
Temple

I have an approvals process that allows for approvals via email.  It works wonderfully.  It will accept any of the "approve, approved, yes, reject, rejected, or no" commands on the first line.  However, no comments on the second line will write back to the comments section of the approvals related list at the bottom of the custom object.  I am out of ideas on what to look for to fix this.  I am making sure I use a line break after the first line.  Like so:

approve
looks good!
 
This will approve the record as it should, but ignores the comments of "looks good!" .... 

Thoughts?
Thanks in advance.

Anyone have an idea why this query works just fine:

soql = 'SELECT Name,Status__c,Contractor__c,Name_Of_Job__c,Job__r.Type__c FROM Bid__c WHERE name != null'; runQuery();       }

 

 

but this one fails:

soql = 'SELECT Name,Status__c,Contractor__c,Name_Of_Job__c,Job__r.Type__c FROM Bid__c WHERE name != null ORDER BY Name_Of_Job__c'; runQuery();       }

 

 

I am not seeing the issue with the ORDER BY clause.

I am writing a chunk of code to take information from a custom object, and place it into an email when a partner portal user selects a custom button.

 

When it comes to building the body of the email, I am trying to find a way to make it look nice.

In .NET I could use stringbuilder to assemble the line breaks and feed in the variables where needed then convert to a string.

 

Is there an equivalent to that in Salesforce? 

Does anyone have an example of syntax for it?

 

Thanks,

Temple Sutfin

I have a trigger that works awesome when I insert a record.  The problem is when I update the parent record, the child records do not populate.

I am quite new to triggers.

 

The scenario:

   A Renewal may / may not be ammoritzed over "x" amount of months.

   If renewal is amoritzed, then "Number of months to amortize over" must be entered. (Validation rule covers this)

   On save, the trigger inserts the number of child records into Renewal Payments equal to the number of months to amoritze over.

 

The problem:

    This works fantastic if I am inserting a new record.  But if later, I decide to edit an existing record to amortize over, the trigger doesnt fire.  I know that this is because of how I have my current trigger defined (see below) but I dont get how to do an after (or before?) update to solve the problem.  Can someone help me out?

 

Existing trigger:

trigger renewalAmortPayments on Renewal_Year__c (after insert) {
   List<Renewal_Payment__c> listInsertPayments = new List<Renewal_Payment__c>();
   for(Renewal_Year__c objPayment:Trigger.New) {
       if(objPayment.Number_of_Months_to_Amortize_over__c != NULL) {
           Decimal decVal = objPayment.Number_of_Months_to_Amortize_over__c -1;
           Integer iCount = Integer.ValueOf(decVal);
           for(integer i = 0; i <= iCount; i++){
               Renewal_Payment__c objRenPay = New Renewal_Payment__c();
               objRenPay.Renewal_Year__c = objPayment.id;
               objRenPay.Payment_Number__c = i;
               listInsertPayments.add(objRenPay);
           }
       }
    }
    if(listInsertPayments.size()>0) { insert listInsertPayments; }
}

 Some extra info:

 

 There is a date calc field on the existing child object that requires me to use the "Decimal decVal = objPayment.Number_of_Months_to_Amortize_over__c -1;" line.  I need to be able to enter the records on INSERT of original record on UPDATE of existing Renewal_Year__c record, and possibly to delete Renewal_Payments__c records if there is an error discovered after user saves initial record.

 

Anyone have some help for me?  I would appreciate it. 

 

Thanks,

Temple

I created record types on the opportunity object, and had to subsequently create a Sales Process too.  Now that I have everything the way that I want it, when I try to migrate it from a sandbox into production, I get the same error no matter what. 
"Opportunity.Flip : Required field is missing: businessProcess"
 

I get this error for each of my record types.  I can't find anything online to explain this.  Anyone have an idea (that does not involve change sets?)

Thanks in advance

I have an approvals process that allows for approvals via email.  It works wonderfully.  It will accept any of the "approve, approved, yes, reject, rejected, or no" commands on the first line.  However, no comments on the second line will write back to the comments section of the approvals related list at the bottom of the custom object.  I am out of ideas on what to look for to fix this.  I am making sure I use a line break after the first line.  Like so:

approve
looks good!
 
This will approve the record as it should, but ignores the comments of "looks good!" .... 

Thoughts?
Thanks in advance.

Anyone have an idea why this query works just fine:

soql = 'SELECT Name,Status__c,Contractor__c,Name_Of_Job__c,Job__r.Type__c FROM Bid__c WHERE name != null'; runQuery();       }

 

 

but this one fails:

soql = 'SELECT Name,Status__c,Contractor__c,Name_Of_Job__c,Job__r.Type__c FROM Bid__c WHERE name != null ORDER BY Name_Of_Job__c'; runQuery();       }

 

 

I am not seeing the issue with the ORDER BY clause.

I am writing a chunk of code to take information from a custom object, and place it into an email when a partner portal user selects a custom button.

 

When it comes to building the body of the email, I am trying to find a way to make it look nice.

In .NET I could use stringbuilder to assemble the line breaks and feed in the variables where needed then convert to a string.

 

Is there an equivalent to that in Salesforce? 

Does anyone have an example of syntax for it?

 

Thanks,

Temple Sutfin

I have a trigger that works awesome when I insert a record.  The problem is when I update the parent record, the child records do not populate.

I am quite new to triggers.

 

The scenario:

   A Renewal may / may not be ammoritzed over "x" amount of months.

   If renewal is amoritzed, then "Number of months to amortize over" must be entered. (Validation rule covers this)

   On save, the trigger inserts the number of child records into Renewal Payments equal to the number of months to amoritze over.

 

The problem:

    This works fantastic if I am inserting a new record.  But if later, I decide to edit an existing record to amortize over, the trigger doesnt fire.  I know that this is because of how I have my current trigger defined (see below) but I dont get how to do an after (or before?) update to solve the problem.  Can someone help me out?

 

Existing trigger:

trigger renewalAmortPayments on Renewal_Year__c (after insert) {
   List<Renewal_Payment__c> listInsertPayments = new List<Renewal_Payment__c>();
   for(Renewal_Year__c objPayment:Trigger.New) {
       if(objPayment.Number_of_Months_to_Amortize_over__c != NULL) {
           Decimal decVal = objPayment.Number_of_Months_to_Amortize_over__c -1;
           Integer iCount = Integer.ValueOf(decVal);
           for(integer i = 0; i <= iCount; i++){
               Renewal_Payment__c objRenPay = New Renewal_Payment__c();
               objRenPay.Renewal_Year__c = objPayment.id;
               objRenPay.Payment_Number__c = i;
               listInsertPayments.add(objRenPay);
           }
       }
    }
    if(listInsertPayments.size()>0) { insert listInsertPayments; }
}

 Some extra info:

 

 There is a date calc field on the existing child object that requires me to use the "Decimal decVal = objPayment.Number_of_Months_to_Amortize_over__c -1;" line.  I need to be able to enter the records on INSERT of original record on UPDATE of existing Renewal_Year__c record, and possibly to delete Renewal_Payments__c records if there is an error discovered after user saves initial record.

 

Anyone have some help for me?  I would appreciate it. 

 

Thanks,

Temple

Hi,

 

Code coverage issue.

 

when i run all test  from setup-->develop-->apex classes  its show 76% code coverage.

but when i go to make new package.

I add all apex class and  pages, tabs,buttons in package.

and when i go for upload this package its show error you can not upload this package code coverage is 12%

 

so please suggest why this happen its show 76% code coverage when i run all test from apex class.

 

so give solution.

 

Thanks

Prashant