• Brittany
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 9
    Replies
I am looking to recreate the "Create PDF" button on the quote page. What I am looking to do is have the custom create pdf button only list certain templates that can be used for a certain record type. My question is how do I go about recreating the "Create PDF" button to work simpler to the standard button. I am not a developer so I am trying to figure out the code needed to create the custom button and trying to figure out if I need to create a visualforce page, iframe, javascript, or whatever to get this working.

Hi,

 

I am trying to find out if it is possible to show a dashboard, that I have already created on a dashboard page, to show up in a Visualforce page.

 

Does anyone know if this is possible?

 

Hi all,

 

I am new to writing triggers and I am having a little trouble writing the test class code for the trigger. The trigger is suppose to fire when several Oppportunity fields met a certain criteria. Below is the criteria:

  • Product Line = Non-Standard
  • Products = YES
  • Stage = Propose
  • Opportunity Record Type is not "Active Client : Renewal", "Active Client : Services Only", or "New Client : Services Only"

Now I was not sure how to modifiy the trigger code to look at the Opportunity Record Type field (kept getting an error message saying something about SObject), so instead I created a formula field that puts the Opportunity Record Type field into text (called it Oppty Record Type). The trigger works great when I manually test it out but when I wrote the test class code I get an error message saying

 Error: Compile Error: Field is not writeable: Opportunity.Oppty_Record_Type__c at line 12 column 9

 

So iam assuming that I am getting this error message because it is a formula field, maybe? Is it possible for someone to tell me how to use the Opportunity Record Type as a criteria field in the trigger code or how to modify the test class code?

 

Below is both the trigger and the test class

 

Trigger

trigger OpportunitySubmitForApproval on Opportunity (after update) {
 
    list<Opportunity>updateOpps = new list<Opportunity>();
    
    for (Opportunity opp : trigger.new) {
 
        if (opp.StageName == 'Propose' && opp.Products__c == 'YES' && opp.Product_Line__c == 'Non-Standard' &&
        (opp.Oppty_Record_Type__c != 'Active_Client_Renewal' && opp.Oppty_Record_Type__c != 'Active_Client_Services_Only' && opp.Oppty_Record_Type__c != 'New_Client_Services_Only')) {

            // create the new approval request to submit
            Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
            req.setComments('Submitted for approval. Please approve.');
            req.setObjectId(opp.id);
            // submit the approval request for processing
            Approval.ProcessResult result = Approval.process(req);
            // display if the request was successful
            System.debug('Submitted for approval successfully: '+result.isSuccess());
 
        }
     }
}

 Test Class

@isTest
private class TestOpportunitySubmitForApproval {
 
    static testMethod void testApprovalSuccess() {
 
        Opportunity opp = new Opportunity();
        opp.Name = 'Non-Standard Approval test';
        opp.StageName = 'Demonstrate';
        opp.Product_Line__c = 'Non-Standard';
        opp.CloseDate = Date.today();
        opp.LeadSource = 'Other';
        opp.Oppty_Record_Type__c = 'New_Client_New_System';
        // insert the new opp
        insert opp;
        // change the probability of the opp so the trigger submits it for approval
    opp.StageName = 'Propose';
    // update the opp which should submit it for approval
    update opp;
 
        // ensure that the opp was submitted for approval
        List<ProcessInstance> processInstances = [select Id, Status from ProcessInstance where TargetObjectId = :opp.id];
    System.assertEquals(processInstances.size(),1);
 
    }
 
}

 

Thank you!

  

I am not sure how to do this or if it is possible. I just would like to prevent the sales rep from creating a pdf of a quote before it has been approved. Similar to how you can prevent the sales rep from emailing the quote to the client. I do have that in place but nothing is stopping the sales rep from creating the pdf, saving it to their computer and emailing it through outlook (not SFDC). 

Hi everyone,

 

I am hoping that someone could help me out and I apologize if I posted this in the wrong section. I am new to the developer force. My company has the Enterprise version of SFDC.

 

I am trying to find a way to have new leads that come in to SFDC convert automatically if there is an existing contact or if the leads company is an existing account. I don't know Apex code all that well so anything would help.

 

Thank you!

Hi all,

 

I hope someone can help me out, I am new to quoting in SFDC. I am trying to figure out how to manipulate the Total Price field on a Quote Line Item to round to the nearest dollar. Right now I am under the assumption that quoting works in this way. 

 

If the Sales Rep is going to discount the product then the Sales Price = the List Price and the sales rep puts in the discount so that the Total Price = the "actual price" that the sale rep actually sold the product for. 

If the Sales Rep sells the product at a premium then the Sales Price = the "actual price" and no discount is applied.

 

So for example

 

Product A List Price = $15,000

John the Salesman sold Product A for $12,500

John creates a quote in SFDC with the necessary fields filled in :

      List Price = $15,000;

      Sales Price = $15,000;

      Discount approx. 16.67%;

      Total Price = $12,499.50.

 

Now my question is there a way to round the Total Price to the nearest dollar or is there a way to manipulate the quoting feature so that it works the way I want it to work or I am misunderstood on how quoting actually works?

 

Thanks!!!

 

 

I already asked SF Support and the basic answer community and did not get a answer that I was really looking for (which was no). So I figured I would ask you guys.

 

My general manager would like an email alert to be sent when the Last Activity Date on an opportunity is greater than 7 days and another if Stage Duration is greater than 7 days. I am have trouble creating workflow rules for these two email alerts.

 

I was told that this wasn't possible from Support and basic answer community said to add a custom field checkbox to the opportunity which is not ideal at all. Please let me know if this is at all possible and if so can you PLEASE provide me with the correct formula in which this is possible.

 

My company has Enterprise Edition and we dont have permission to create apex triggers.

 

Thanks in advance!!!!!!

I am new to SalesForce and really do not have any experience with Apex Coding. My company wants to be able to automatically generate a Renewal Opportunity when Stage is set to Closed Won. We have a 7 Record Types for Opportunities ("New Sales : New Systems", "New Sales : Services Only", "Active Client : Renewal", "Active Client : New System", Active Client : Services Only", "Debook - Full", and "Debook - Partial") and out of those 7,  the first 5 would need to generate a Renewal Opportunity with a Record Type "Active Client : Renewal". I saw that there were a few blogs about cloning the opportunity but in my case that would not work due to the fact Record Type needs to change so does many of the fields. Also, I wouldn't need to map the Opportunity Products from the original Opportunity.

 

Please if anyone can help me. It's greatly appreciated!

Hi,

 

I am trying to find out if it is possible to show a dashboard, that I have already created on a dashboard page, to show up in a Visualforce page.

 

Does anyone know if this is possible?

 

Hi all,

 

I am new to writing triggers and I am having a little trouble writing the test class code for the trigger. The trigger is suppose to fire when several Oppportunity fields met a certain criteria. Below is the criteria:

  • Product Line = Non-Standard
  • Products = YES
  • Stage = Propose
  • Opportunity Record Type is not "Active Client : Renewal", "Active Client : Services Only", or "New Client : Services Only"

Now I was not sure how to modifiy the trigger code to look at the Opportunity Record Type field (kept getting an error message saying something about SObject), so instead I created a formula field that puts the Opportunity Record Type field into text (called it Oppty Record Type). The trigger works great when I manually test it out but when I wrote the test class code I get an error message saying

 Error: Compile Error: Field is not writeable: Opportunity.Oppty_Record_Type__c at line 12 column 9

 

So iam assuming that I am getting this error message because it is a formula field, maybe? Is it possible for someone to tell me how to use the Opportunity Record Type as a criteria field in the trigger code or how to modify the test class code?

 

Below is both the trigger and the test class

 

Trigger

trigger OpportunitySubmitForApproval on Opportunity (after update) {
 
    list<Opportunity>updateOpps = new list<Opportunity>();
    
    for (Opportunity opp : trigger.new) {
 
        if (opp.StageName == 'Propose' && opp.Products__c == 'YES' && opp.Product_Line__c == 'Non-Standard' &&
        (opp.Oppty_Record_Type__c != 'Active_Client_Renewal' && opp.Oppty_Record_Type__c != 'Active_Client_Services_Only' && opp.Oppty_Record_Type__c != 'New_Client_Services_Only')) {

            // create the new approval request to submit
            Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
            req.setComments('Submitted for approval. Please approve.');
            req.setObjectId(opp.id);
            // submit the approval request for processing
            Approval.ProcessResult result = Approval.process(req);
            // display if the request was successful
            System.debug('Submitted for approval successfully: '+result.isSuccess());
 
        }
     }
}

 Test Class

@isTest
private class TestOpportunitySubmitForApproval {
 
    static testMethod void testApprovalSuccess() {
 
        Opportunity opp = new Opportunity();
        opp.Name = 'Non-Standard Approval test';
        opp.StageName = 'Demonstrate';
        opp.Product_Line__c = 'Non-Standard';
        opp.CloseDate = Date.today();
        opp.LeadSource = 'Other';
        opp.Oppty_Record_Type__c = 'New_Client_New_System';
        // insert the new opp
        insert opp;
        // change the probability of the opp so the trigger submits it for approval
    opp.StageName = 'Propose';
    // update the opp which should submit it for approval
    update opp;
 
        // ensure that the opp was submitted for approval
        List<ProcessInstance> processInstances = [select Id, Status from ProcessInstance where TargetObjectId = :opp.id];
    System.assertEquals(processInstances.size(),1);
 
    }
 
}

 

Thank you!

  

Hi all,

 

I hope someone can help me out, I am new to quoting in SFDC. I am trying to figure out how to manipulate the Total Price field on a Quote Line Item to round to the nearest dollar. Right now I am under the assumption that quoting works in this way. 

 

If the Sales Rep is going to discount the product then the Sales Price = the List Price and the sales rep puts in the discount so that the Total Price = the "actual price" that the sale rep actually sold the product for. 

If the Sales Rep sells the product at a premium then the Sales Price = the "actual price" and no discount is applied.

 

So for example

 

Product A List Price = $15,000

John the Salesman sold Product A for $12,500

John creates a quote in SFDC with the necessary fields filled in :

      List Price = $15,000;

      Sales Price = $15,000;

      Discount approx. 16.67%;

      Total Price = $12,499.50.

 

Now my question is there a way to round the Total Price to the nearest dollar or is there a way to manipulate the quoting feature so that it works the way I want it to work or I am misunderstood on how quoting actually works?

 

Thanks!!!

 

 

I already asked SF Support and the basic answer community and did not get a answer that I was really looking for (which was no). So I figured I would ask you guys.

 

My general manager would like an email alert to be sent when the Last Activity Date on an opportunity is greater than 7 days and another if Stage Duration is greater than 7 days. I am have trouble creating workflow rules for these two email alerts.

 

I was told that this wasn't possible from Support and basic answer community said to add a custom field checkbox to the opportunity which is not ideal at all. Please let me know if this is at all possible and if so can you PLEASE provide me with the correct formula in which this is possible.

 

My company has Enterprise Edition and we dont have permission to create apex triggers.

 

Thanks in advance!!!!!!