• Cyrus Talladen
  • NEWBIE
  • 139 Points
  • Member since 2014
  • Salesforce Engineer
  • Levementum

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 64
    Replies
Hi,

I'm trying to get my head around OO best practices, and how to really implement it correctly.  So for example with my test data, I'm thinking that it should really be in one class, and then called as needed by all my other classes yes?  And if so, what is the best way to strucutre it.  I'm thinking in general there should be a seperate method for each type of data I would need for each object, but I'm not really sure.

Here is what I have so far.  Thoughts on best way to do this?
 
public class CreateTestData {
    
    List<Account> acctList = new List<Account>();
    List<Opportunity> oppList = new List<Opportunity>();
    List<Client_Plan__c> clientList = new List<Client_Plan__c>();
    List<Client_Plan_Product__c> clientProdList = new List<Client_Plan_Product__c>();
    List<Tasting__c> tasteList = new List<Tasting__c>();
    List<Tasting_Product__c> tasteProdList = new List<Tasting_Product__c>();
    
    
    
    public List<Account> CreateAccount(String testName, Integer count) {
        for (Integer i = 0; i < count; i++) {
            Account acct = new Account(name = (testName + i) );
            acctList.add(acct);
        }
        insert(acctList);
        return acctList;
    }
    
    public list<Opportunity> CreateOpportunity(String testName, Integer count) {
        if(acctList==NULL) {
            CreateAccount(testName, count);
        }
        for (Account acct :acctList) {
            for(Integer i = 0; i <count; i++) {
                Opportunity opp = new Opportunity(Name = (testName+count), AccountId = acct.id);
                oppList.add(opp);
            }
        }
        
        insert(oppList);
        return oppList;
    }
    
    public list<Client_Plan__c> CreateClient(String testName, Integer count) {
            if(acctList==NULL) {
            CreateAccount(testName, count);
        }
        
        
        for(Integer i = 0; i <count; i++) {
            Client_Plan__c plan = new Client_Plan__c(Name = (testName+count), Account__c = acctList[i].id);
            ClientList.add(plan);
            
        }
        insert(ClientList);
        return (ClientList);
    }
    
    

}

 

 
Hi, 
I have an assignment. I have multiple record types 9and page layouts) for opportunity stages. The assignment is to create a trigger that will prevent users from moving into another stage if Primary Contact role on the Opportunity is not entered. Please help

Thank you, 

Liubov
Good afternoon.  Before I start contracting work out, I thought I would ask here.  We have a custom object for quotes and we are in the process of switching to the standard object.  During our original implementation, a trigger was built so that everytime a quote was created, or a subsequent quote was created on an opoortunity, it would give the quote a "number" which in turn, make that number a letter.  So, you end up with quote revisions.  

So on the trigger, I no longer want to reference the customer quote object (in bold), I want to reference the standard which would be Quote__c (I assume).  Here is a small portion of the trigger as it is today.  When I change the bold text to Quote__c, this is the error:[Error] Error: Compile Error: Invalid SObject type name: Quote__c at line 1 column 32

trigger PrimaryQuoteTrigger on SFDC_520_Quote__c (before insert, before update, before delete, after insert, after update) {
    // Rules:
    // #1 Can't delete primary quote
    // #2 Primary quote cannot be un-marked primary. A different existing quote must be marked primary which will unmark the others.
    // #3 Only one primary quote per oppy
    // #4 First quote on oppy must be primary

Any help would be appreciated.  Thanks, Nikki ~
 
I want to implement a lookup which can contain values like(TEST01, TESO02, TEST03)
is it poosible to implement a lookup without creating a new object
  • March 05, 2015
  • Like
  • 0
Hello,

I am having issues connecting to my test developer org when I am configuring my Cast Iron orchestration.  I have an http and salesforce endpoint and a receive request and query objects activities.  When I was testing the connection of my salesforce endpoint Cast Iron was returning with an invalid login message.  I reset my token and my password is not the problem because I was able to login manually to the org to do the configurations.  But for some reason Cast Iron is not able to login to the dev org.  Any suggestions would be great.  Thanks in advance! 
 
Hello, if someone can help me figure this out, it would be great. 

I have a checkbox that when checked, the Lead Status picklist when selected with a particular item, a multi-picklist field can't be left blank, as the user will need to make a selection. If the multipicklist is left blank and a user tries to save the lead, user will be prompted to fill in the multipicklist field. 

API Names:
checkbox12__c (checkbox)
Lead Status = Pure (picklist)
Special_Items__c must not be blank when above two match criteria

Thanks!
Hello,
I am trying to compile a report that will show the in year value of all opportunites using their forecast value.
i.e. using the forecast value of an opp to calculate the actual amount of revenue that will be created in that year. If it had a start date of July 1st this would mean that its in year value would be half its actual value.
I contacted Salesforce help but was told that standard saleforce is not able to create a Formula Field that would have the 365 days of the year that I would need. They suggested I contact you for any suggestions/solutions.

Here's hoping you can help. Thanks very much, Olivia.
Has anyone managed to utilise soapUI pro to authenticate using oauth with the salesforce analytics API? I can use the google rest console but am getting an error with soapUi pro stating that 'grant type not supported'
Hello,
I'm having a strange issue where, on the grants page, we cannot save any data. There's no error message, but when you click 'Save' and refresh, any changes you've made are not kept, and the Last Modified Date doesn't change. Other pages seem to be saving normally.
This has happened for Lead Gen and Dev accounts.
Any help or pointers are greatly appreciated.
Thank you
I have a custom field I would like to add to the Send an Email take page layout.  Is this possible?  Or, is it possible to change the auto activity that is generated after an email is sent?  Thank you!
How to get Fields/Custom Fields list of an Object(Opportunity etc..)  Using Tooling API in .net.
Hello,

I am trying to import the partner.wsdl in my java environment. I am using Mac OS X 10.10 and JDK 1.7 u60. I downloaded the WSC jar file from http://mvnrepository.com/artifact/com.force.api/force-wsc/33.0.3 and using it to import the wsdl file. The jar file, wsdl file are in the current directory.
When I execute the following command, I get a bunch of error messages.

java -classpath force-wsc-33.0.1.jar com.sforce.ws.tools.wsdlc partner.wsdl partner.jar

Exception in thread "main" java.lang.NoClassDefFoundError: org/stringtemplate/v4/STGroupDir
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2570)
    at java.lang.Class.getMethod0(Class.java:2813)
    at java.lang.Class.getMethod(Class.java:1663)
    at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.stringtemplate.v4.STGroupDir
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 6 more

When I googled, they point to issues in classpath, but I have referenced to the right classpath in my environment variable. 

<~/Downloads>echo ${CLASSPATH}

:/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home:/Users/harish/Downloads:/Users/harish/Coding/JM


Could someone help me with this situation? Thanks.

-Harish
Hi all does anyone know why this class 

public class staticFlagsForRecursionTriggers 
{
    public static boolean firstRun = true;
}

Can't be seen by my trigger when i call a controller from a visual force page?

the trigger is :

if(trigger.isAfter && (trigger.isInsert || trigger.isUpdate) && staticFlagsForRecursionTriggers.firstRun == TRUE)
    {
        handler.calculateTotals(Trigger.new);
        staticFlagsForRecursionTriggers.firstRun = FALSE;
    } 

staticFlagsForRecursionTriggers.firstRun is always false so the trigger isnt running.

Thanks
I've got this piece of code:

for (String key : mapADXadUnit.keySet()) {
            system.debug('@@key ' + key);
            String keywrapper = mapADXadUnit_wrappers_key.get(key);
            
            Asset tempasset = new Asset();
            Product2 prod = new Product2();
            tempasset.product2 = prod;
            
            tempasset.Name = key;
            Integer trovato = 0;
            
            for(AdUnit__c ad: alladunit){
                String path_query = ad.Path__c;
                path_query = path_query.deleteWhitespace();
                system.debug('@@adunit path '+  ' - ' + path_query + ' - wrapper: ' + mapADXadUnit_path.get(key)); //+ mapADXadUnit_path.get(key));
                if(path_query == mapADXadUnit_path.get(key)){
                system.debug('@@trovat '+  ' - ' + path_query + ' - wrapper: ' + mapADXadUnit_path.get(key));
                tempasset.AdUnit__c = ad.Id;
                tempasset.year__c = year;
                tempasset.month__c = mapMonths.get(Integer.valueOf(month));
                tempasset.adUnitView__c = 'FLAT';
                tempasset.Line_Item__c =  mapADXadUnit_LI.get(key).Id;
                tempasset.Product2 =  [SELECT Id FROM product2 WHERE Id =:mapADXadUnit_LI.get(key).Product__r.id];
                
                try{
                    system.debug('@@product: ' + mapADXadUnit_LI.get(key).Product__r.id);
                    //tempasset.Product2.Id =  mapADXadUnit_LI.get(key).Product__r.id;
                } catch (exception e){
                    system.debug(e.getMessage());
                    system.debug('@@product_errore: '+ key + ' >> ' + mapADXadUnit_LI.get(key).Product__r.id);
                }
                tempasset.Impressions__c = mapADXadUnit.get(key)[2];
                trovato = 1;
                break;
                }
            }
            
            if(trovato != 1){
            wrappers.get(keywrapper).setError('Problemi con gli Asset: non è possibile trovare adUnit con il path indicato nel file');
            }
            //system.debug('@tempassetproduct ' + tempasset.Product2.Id);
            system.debug('@tempasset keywrapper: '+ keywrapper + ':::::::: tempasset: '+ tempasset);
            if(mapListAssetToInsert.get(keywrapper) == null){
                mapListAssetToInsert.put(keywrapper, new List<Asset>{tempasset});
            } else{
                mapListAssetToInsert.get(keywrapper).add(tempasset);
            }
        }
        
            for(string key: mapListAssetToInsert.keyset()){
            system.debug('@@mapListAssetToInsert: ' + key + ' - ' + mapListAssetToInsert.get(key));
            }

Now, the strange thing is the output. The record "tempasset" seems to be correct every cycle:

18:15:44.373 (3373776808)|USER_DEBUG|[431]|DEBUG|@tempasset keywrapper: 123asd123asd - 300x250&#124;&#124; tempasset: Asset:{Name=123asd123asd - 300x250 - BLOG > hp, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVnzAAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od7nAAC, Impressions__c=10.0}

18:15:44.404 (3404302842)|USER_DEBUG|[431]|DEBUG|@tempasset keywrapper: 123asd123asd - 500x300&#124;&#124; tempasset: Asset:{Name=123asd123asd - 500x300 - BLOG > ros, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVotAAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od9oAAC, Impressions__c=10.0}

18:15:44.424 (3424780098)|USER_DEBUG|[431]|DEBUG|@tempasset keywrapper: 123asd123asd - 300x250&#124;&#124; tempasset: Asset:{Name=123asd123asd - 300x250 - Buonissimo > hp, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVo0AAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od7nAAC, Impressions__c=10.0}

But the map where I write this record it's quite strange and has three times the same record, the last one:

18:15:44.425 (3425647410)|USER_DEBUG|[440]|DEBUG|@@mapListAssetToInsert: 123asd123asd - 300x250 - (Asset:{Name=123asd123asd - 300x250 - Buonissimo > hp, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVo0AAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od7nAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 300x250 - Buonissimo > hp, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVo0AAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od7nAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 300x250 - Buonissimo > hp, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVo0AAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od7nAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 300x250 - Buonissimo > hp, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVo0AAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od7nAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 300x250 - BLOG > hp, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVnzAAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od7nAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 300x250 - Buonissimo > hp, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVo0AAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od7nAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 300x250 - BLOG > hp, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVnzAAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od7nAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 300x250 - Buonissimo > hp, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVo0AAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od7nAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 300x250 - BLOG > hp, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVnzAAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od7nAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 300x250 - Buonissimo > hp, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVo0AAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od7nAAC, Impressions__c=10.0}, ...)


18:15:44.426 (3426045158)|USER_DEBUG|[440]|DEBUG|@@mapListAssetToInsert: 123asd123asd - 500x300 - (Asset:{Name=123asd123asd - 300x250 - Buonissimo > hp, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVo0AAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od7nAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 300x250 - Buonissimo > hp, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVo0AAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od7nAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 500x300 - BLOG > ros, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVotAAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od9oAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 500x300 - BLOG > ros, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVotAAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od9oAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 500x300 - BLOG > ros, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVotAAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od9oAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 500x300 - BLOG > ros, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVotAAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od9oAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 500x300 - BLOG > ros, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVotAAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od9oAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 500x300 - BLOG > ros, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVotAAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od9oAAC, Impressions__c=10.0}, Asset:{Name=123asd123asd - 500x300 - BLOG > ros, Month__c=Marzo, Year__c=2015, AdUnit__c=a0011000001LVotAAG, adUnitView__c=FLAT, Line_Item__c=a0811000004Od9oAAC, Impressions__c=10.0})

Have you got any idea?

Thanks!
 
Hi,

I'm trying to get my head around OO best practices, and how to really implement it correctly.  So for example with my test data, I'm thinking that it should really be in one class, and then called as needed by all my other classes yes?  And if so, what is the best way to strucutre it.  I'm thinking in general there should be a seperate method for each type of data I would need for each object, but I'm not really sure.

Here is what I have so far.  Thoughts on best way to do this?
 
public class CreateTestData {
    
    List<Account> acctList = new List<Account>();
    List<Opportunity> oppList = new List<Opportunity>();
    List<Client_Plan__c> clientList = new List<Client_Plan__c>();
    List<Client_Plan_Product__c> clientProdList = new List<Client_Plan_Product__c>();
    List<Tasting__c> tasteList = new List<Tasting__c>();
    List<Tasting_Product__c> tasteProdList = new List<Tasting_Product__c>();
    
    
    
    public List<Account> CreateAccount(String testName, Integer count) {
        for (Integer i = 0; i < count; i++) {
            Account acct = new Account(name = (testName + i) );
            acctList.add(acct);
        }
        insert(acctList);
        return acctList;
    }
    
    public list<Opportunity> CreateOpportunity(String testName, Integer count) {
        if(acctList==NULL) {
            CreateAccount(testName, count);
        }
        for (Account acct :acctList) {
            for(Integer i = 0; i <count; i++) {
                Opportunity opp = new Opportunity(Name = (testName+count), AccountId = acct.id);
                oppList.add(opp);
            }
        }
        
        insert(oppList);
        return oppList;
    }
    
    public list<Client_Plan__c> CreateClient(String testName, Integer count) {
            if(acctList==NULL) {
            CreateAccount(testName, count);
        }
        
        
        for(Integer i = 0; i <count; i++) {
            Client_Plan__c plan = new Client_Plan__c(Name = (testName+count), Account__c = acctList[i].id);
            ClientList.add(plan);
            
        }
        insert(ClientList);
        return (ClientList);
    }
    
    

}

 

 
Hi,

I've got a visualforce page with a custom controller.  This page simply displays the current user's open leads.  It does not do any DML at all, it simply displays existing leads on a visualforce page.

What I need is a test class for this page and its custom controller.

I'm not sure how to write a test class for this kind of thing.

Here's the visualforce page, called "myLeadsView1":
 
<apex:page Controller="myLeadListCtr1">
<apex:form >
    <html>
    &nbsp;&nbsp;&nbsp;<img src="/img/icon/people32.png"/>
    <font size="5">&nbsp;My Open-Uncontacted Leads </font><br></br>
    <h2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*Showing my leads, created in the past 6 months, in an 'Open - Not Contacted' status<br></br></h2>
<apex:pageBlock >
    <apex:pageBlockTable value="{!accounts}" var="account">
                                    
                                    <apex:column >
                                    <apex:outputlink value="/{!account.Id}">{!account.LastName}</apex:outputLink>
                                    <apex:facet name="header"> Lead Last Name </apex:facet>     
                                    </apex:column>                                                                        
                                    
                                    <apex:column >
                                    <apex:outputlink value="/{!account.Id}">{!account.FirstName}</apex:outputLink>
                                    <apex:facet name="header"> Lead First Name </apex:facet>     
                                    </apex:column>      
                                    
                                <apex:column > 
                                    <apex:outputField value="{!account.Response_Needed__c}" />
                                    <apex:facet name="header"> Urgency                                      
                                    </apex:facet>                                                                      
                                </apex:column>                                                                   

                                <apex:column >
                                    <apex:outputLink value="/{!account.Id}">{!account.Status}</apex:outputLink>
                                    <apex:facet name="header"> Status</apex:facet>
                                </apex:column>                                 
                                                                         
        <apex:column value="{!account.Email}"/>
        <apex:column value="{!account.Phone}"/>
        <apex:column value="{!account.CreatedDate}"/>

    </apex:pageBlockTable>
                    <br></br>                 
                    <apex:outputLink target="_blank" value="https://cs15.salesforce.com/00Oe0000000Tb5X" id="theLink">View All My Open  Leads</apex:outputLink>
</apex:pageBlock>
</html>
</apex:form>
</apex:page>

Here's the customer controller:
 
public with sharing class myLeadListCtr1 {

    public List<Lead> getAccounts()
    {
        String userId=UserInfo.getUserId();
        UserId=userId.Substring(0,15);
        return [Select Id,Response_Needed__c,FirstName,LastName,Name,Email,Phone,CreatedDate,Status from Lead WHERE (Status = 'Open - Not Contacted' ) AND CreatedDate = LAST_N_DAYS:180 AND OwnerId =: userId ORDER BY CreatedDate DESC LIMIT 1000  ];
    }

}

Does anyone know how I might be able to write a good test class for this code?  Since it does no DML, I don't really know how to test this "code".  I put code in parentheses since it's not really code, but rather just a visualforce page that displays existing data.  

Thanks guys.


 
Hi Everyone,

I want to have a validation rule to prevent special characters in text field except these 2: (.) and (‘).  please advise. thanks
Hi,
I have a requiremnt where i want to know that specfic pacakge exsist in the enviroment or not.If it is not present in the enviroment than show an error.
 Is there any way to identify that an specfic package is installed in the enviroment or not via using apex?
Any one who as idea/sample code regarding this please help.

Thanks,
I have a Payments object, and on that Payments Object I have formula fields that calculate how many calendar years ago and fiscal years ago the payment was made.  I needed the values to roll up to the Opportunity, but rollups don't work with formula fields- so I created currency fields to hold the values for the rollup.

But I can't seem to set the default value on those currency fields to a formula field in the same object.  I can't create a workflow that runs on January 1 and July 1.  Doing a manual mass update twice a year isn't the worst scenario in the world, but If I need to run a report with the correct rollup values and I don't notice they are incorrect- my report is wrong.  Or if I do notice, then I have to reack down why the value isn't right.

Any ideas to automate the process to copy the calues from the formula field to the currency field on a particular date?
2 issues.  

#1 as an admin user the code below works fine.  If my Tier 2 guys try it, it says insufficient privs.  They do have the Send Email permission.  The Standard Send Email button in Accounts >Activities works fine.

#2 If I click the email button, and decide to cancel, it still makes the changes.  How do I account for cancelling?  
 
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}
var solObj = new sforce.SObject("Solution"); 
solObj.Id = '{!Solution.Id}'; 
solObj.Status = 'Needs Update';
solObj.IsPublished = false;
solObj.Approved_checkbox__c = false;
sforce.connection.update([solObj]);

location.replace('/_ui/core/email/author/EmailAuthor?retURL=/{!Solution.Id}&p3_lkid={!Solution.Id}&p5=gilmore_staci@cat.com&p24=mansfield_matthew@cat.com&template_id=00X19000000QGBK');

 
  • March 11, 2015
  • Like
  • 0
Good afternoon.  Before I start contracting work out, I thought I would ask here.  We have a custom object for quotes and we are in the process of switching to the standard object.  During our original implementation, a trigger was built so that everytime a quote was created, or a subsequent quote was created on an opoortunity, it would give the quote a "number" which in turn, make that number a letter.  So, you end up with quote revisions.  

So on the trigger, I no longer want to reference the customer quote object (in bold), I want to reference the standard which would be Quote__c (I assume).  Here is a small portion of the trigger as it is today.  When I change the bold text to Quote__c, this is the error:[Error] Error: Compile Error: Invalid SObject type name: Quote__c at line 1 column 32

trigger PrimaryQuoteTrigger on SFDC_520_Quote__c (before insert, before update, before delete, after insert, after update) {
    // Rules:
    // #1 Can't delete primary quote
    // #2 Primary quote cannot be un-marked primary. A different existing quote must be marked primary which will unmark the others.
    // #3 Only one primary quote per oppy
    // #4 First quote on oppy must be primary

Any help would be appreciated.  Thanks, Nikki ~