• TheDoctor
  • NEWBIE
  • 124 Points
  • Member since 2013

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 43
    Replies

Very strange. I'm developing a trigger that sends me an email, and I have been debugging it by monitoring myself in the Debug. Now (this is really weird), suddenly, after running my trigger and deleting the accumulated logs, I am no longer able to monitor myself!! I am able to add any other user in the system, except myself.

 

Could I have hit some kind of limit?

 

Hello,

 

I was curious if I could get assistance with creating a trigger that would update the quote status field for the synced quote based on if a checkbox on the opportunity is true or false.

 

If the opportunity checkbox is "TRUE", the trigger would update the quote status to "Pending RFP".

 

I would only have a single quote related to the opportunity at any point in time and it would always be "synced" using the native salesforce.com quote sync functionality. Would anyone be willing to assist? Thanks so much for any advice.

When do we use __r? 

 

Can we use __r both in Parent Object and in custom object?

 

-Kaity

  • July 22, 2013
  • Like
  • 0

I have been working on updating test classes improving my code coverage.  How can I force Salesforce to update its data on my code coverage?

 

After running the updated test classes and running all of the tests from the Force.com IDE I am told '0 lines not tested, 100% covered'.  But from my Sandbox instance the percentage of code coverage fails to update.  I've run the individual test class within Salesforce in addition to running all of my tests from the 'Apex Test Execution' section of my instance but the percentage of coverage and the data regarding the lines of source code that are covered does not get updated.  

 

I know I've improved my test coverage but when I click on the XX%(XX/XX) link I'm shown the new code but with the old pattern of red and blue lines representing the outdated pattern of covered/not-covered bars.  Lines that are now commented out have red/blue bars in the same locations before I updated the code.

 

There is requirement to send Case update notificaion to owner of the case and also to some subscribers.

These subscribers are present in Text area field.

 

Requirement :-

we need to send email template which will take first name and last name. 

 

------------------------------------------------------------------------

Dear [first name] [last name],

The following  case  has been updated:
   Case Number: [case number]

------------------------------------------------------------------------

 

In standard email template Is there any way to get [first name] and [last name] for subscribers ?

i know code can send it but i dont want to go by that way.

Please suggest ASAP.

 

 

 

 

 

Hi,

 

I am trying to copy the information (Approver, Comments etc) from the Standard Approval Process Related list into custom fields. My debug statements show values but fields are not getting populated with the values. I would really appreciate if someone could suggest a fix to my code.

 

trigger Test_Approval on Test_Obj_1__c (after insert, after update) {
    Set <id> ids = new Set <id>();
        for(Test_Obj_1__c tes1 : Trigger.new){
         ids.add(tes1.id);
System.debug('zz ids: ' + ids);
    }
    
 
    List<Test_Obj_1__c> testlist = [SELECT e.Id, e.Test_Approver__c, e.Comments__c, (Select Id, IsPending, ProcessInstanceId, TargetObjectId, StepStatus, OriginalActorId, ActorId, RemindersSent, Comments, IsDeleted, CreatedDate, CreatedById, SystemModstamp From ProcessSteps)
                                            FROM Test_Obj_1__c e where id=:ids];
    
    if(testlist.size()>0)
    {
        Test_Obj_1__c fund = testlist[0];
 

        for (ProcessInstanceHistory ps : tobj.ProcessSteps)
        {
            tobj.Test_Approver__c = ps.ActorId;
            tobj.Comments__c = ps.Comments;
            System.debug('zz Approver: ' + tobj.Test_Approver__c);
            System.debug('zz Comments:' + tobj.Comments__c);

        }
    }
}

 

Thanks!

Hi all, 

 

I'm wondering if there is a way to export visualforce customizations from Salesforce? I.e. if you were transitioning a company to a larger organization or if you wanted to archive your current salesforce developments, is that possible? Is there a way to export all custom object information as well? If so, how? If not, are there any workarounds, besides manually saving the code for each customization? 

 

Thanks very much!

 

Cupless Joe

We have sales reps that sell opportunities as teams. Today, the pipeline only rolls to one of these reps. The same holds true if a deal is won. 

 

My Org does not use the "in the box" amount revenue field for opportunities. Instead, we use a custom field that is a formula field which allows for several sources to determine the proper pricing (not just products).  

 

SFDC Premiere Support has advised the only way to achieve such split is (1) via Apex or (2) via an AppEx. I am looking for an example of such code to be able to share with my developer team. Does anyone have anything similar I could use an example? 

 

I really don't want to go to an AppEx partner if it is something we can code natively. 

 

thank you. 

Amy 

Does Salesforce Support HIPPA Compliance.

 

If Yes do we have any seperate DataBase where the data can be stored.

i know that automatically sending an email to the email address of users are possible. what if i have a custom object students with email__c field, i want to create a workflow rule that will automatically send an email to all the email addresses saved on  the students object. is this possible?

  • September 09, 2013
  • Like
  • 0

Hi 

 

On account i have related list Opportunity . In this related list i am using a custom button which will Open a VF page for Opportunites . and i have series of Vf pages to complete the Opportunity.

 

Now i am trying to specify the record type also in that URL itself

 

here is the URL of My custom Button

 

 

 /apex/page/ABC_Opportunity_Wizard?accountId={!Account.Id}

 

Here are the URl 's i tried 

 

/apex/page/ABC_Opportunity_Wizard?accountId={!Account.Id}&RecordType =012L0000000CpUL

 

and i tried 

 

/apex/page/ABC_Opportunity_Wizard?accountId={!Account.Id}&RecordType =ABC

 

But no luck at all , any suggestions

 

Thanks

akhil

  • September 09, 2013
  • Like
  • 0

I am trying to create a rule.This is my criteria:

 

I have a field on Opportunity which will change with workflow or either admin CAN only change.I need a rule so that other users can't update that field.

 

How can I say that admin and workflow can change the field but not other users..Please help!!

Very strange. I'm developing a trigger that sends me an email, and I have been debugging it by monitoring myself in the Debug. Now (this is really weird), suddenly, after running my trigger and deleting the accumulated logs, I am no longer able to monitor myself!! I am able to add any other user in the system, except myself.

 

Could I have hit some kind of limit?

 

Greetings,

 

I am to Simulate an edit/save on parent object, which is a custom object, Cunsumer__c from its child, a Standard, Solutions.

 

The code I wrote is:

 

trigger AutoUpdateConsumer on Solution (after insert,after update) {
List<Solution> S = [Select Solution.Consumer__c From Solution];

// String Sol = '0000000042';
id Sol = S[0].Consumer__c;

List<Consumer__c> Con = [Select Consumer__c.Name From Consumer__c where Consumer__c.Name =: Sol ];

Database.update(Con);

}

 

This works fine for Sol =  '0000000042' (in comments) but not for a dynamic, the id which is valid when we edit the specific Solution record and everyone which has the same parent Cunsumer.

 

Any Help really appreciated.

 

Stefanos

I am trying to show the date as calander on first page load. Then user can change the date.

After that, if button is pressed, that selected date value should be passed to controller.

Now I can't even display the initial value to VF page.

How I can set it up?

 

here is my apex

public Date startDate {get;set;}

 

//constructor

public Class_Test()
 {
        startDate = date.today();

}

 

 

 

here is my VF.

<apex:page controller="Class_Test" id="VF_Class_Test" cache="FALSE" showHeader="FALSE" sidebar="FALSE" tabStyle="blah">

...

<apex:inputField value="{!startDate}"/>

Hi,

 

I need help creating an apex trigger for one custom picklist to auto populate another custom picklist.

 

For example I have:

 

Lead Source Detail API Name: Lead_Source_Detail_C

 

And

 

Lead Source Detail v2 API Name: Lead_Source_Detail_v2_C

 

Both have the same values. When Lead source detail is selected and saved, I want Lead Source Detail v2 to auto populate with the same value. V2 is hidden and will be mapped to opportunities, while the original lead source is mapped to contacts.

 

These are the values:

Mike Ferry
NAR 2011
TriplePlay 2011
KW Family Reunion 2012
RealTrends Top 500
Generation Blue 2012
Acro Energy
ERA 2012
San Diego Summit 2012
Territory Analysis E-mail Campaign
Top Brokerage List
WCR 2012
NAR Mid Year 2012
BHG 5/2012
Coldwell Banker Seattle 2012
Hear it Direct - Texas
Ferry's Eagles
Broker
HSC Solar
FAR 2012
Top CA Solar Installs
Mega Camp 2012
CAR 2012
Hear it Direct 2012 - Irvine
NAR 2012 - FL
Triple Play 2012
Weekly Product Webinar
High Tech Farming 2012
Webinar - Jan 2013
Mike Ferry Campaign
Other
KW FR 2013
High-Tech Farming KW 3.6.13
Webinar 4.16.13
The One Thing Offer
KW Mastermind April 2013
Webinar 5.8.13
Craig Proctor 1/2 Day
NAR Mid-Year 2013
Webinar 6.5.13
First American Demo 6.14.13
CB Sales Rally 2013
Craig Proctor Super Conference 2013
Jun-13
First American Demo 7.25.13

 

Thank you so much for the help! I'm completely new to Apex Triggers...

 

-Jessica

Hello,

 

I was curious if I could get assistance with creating a trigger that would update the quote status field for the synced quote based on if a checkbox on the opportunity is true or false.

 

If the opportunity checkbox is "TRUE", the trigger would update the quote status to "Pending RFP".

 

I would only have a single quote related to the opportunity at any point in time and it would always be "synced" using the native salesforce.com quote sync functionality. Would anyone be willing to assist? Thanks so much for any advice.

When do we use __r? 

 

Can we use __r both in Parent Object and in custom object?

 

-Kaity

  • July 22, 2013
  • Like
  • 0

Hello,

 

I want to create a duplicate opportunity, for example, if opportunity stage is equal to “won” , I want it to be able to create an exact replica of the old opportunity.  I know I’ll have to make a workflow and use apex code.

 

How can I write the formula for this?

As many of you have discovered, our developer community is awesome. The wealth of knowledge here is phenomenal. This is an all volunteer community and people who take the time to help and post answers do so totally on their own initiative. With that said when someone provides the right answer to your question please take the time to mark their answer as the accepted solution. Also give them a kudos if they've really gone the extra mile to help out. Show some love ;)