• Evan Kennedy
  • NEWBIE
  • 55 Points
  • Member since 2014

  • Chatter
    Feed
  • 2
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 15
    Replies
We are a non-profit who has multiple trips each year to developing countries to do medical and construction work (Rotary). Our volunteers pay to go on these trips. I set up each trip as a Campaign, each person on the trip is a Campaign Member (who is also a Contact record). I want to track payments made by each Campaign Member (there are installments of 3 to 4 payments).

I think I want to set up a master-child relationship between a custom object (e.g. Payments) and the Campaign Member. That way, I could roll-up the total payments to each member. Addtionally, since people (e.g. Contacts) travel on multiple trips, I could see the payment information at the Campaign Member level so each Contact would have multiple Campaigns and multiple Payments.

However, when I try to create a master-detail relationship between Payments and Campaign Member, the option to select Campaign Member as the master is not shown in the list of available objects. I could do Contact or Campaign, but I think I want the Campaign Member. Eventually I will have automated code that will create the Payments records and associate them with each Campaign Member when each Campaign Member pays on PayPal.

Ideas? Thanks so much!
Hi I am useing below code to display multiple fields in a pageblock.
But I need span one field in two columns. How can I do this

<apex:pageblockSection title="Lead Details" columns="2"> 

<apex:outputField value="{!sellead.Description}" ><apex:inlineEditSupport event="ondblclick" 
            showOnEdit="saveButton, cancelButton" /></apex:outputField> 
I'm trying to verify the first step of the apex super badge, located here: https://trailhead.salesforce.com/en/super_badges/superbadge_apex

The requirements state: "When an existing maintenance request of type Repair or Routine Maintenance is Closed, you create a new maintenance request for a future routine checkup. This new request is tied to the same vehicle and piece of equipment to be serviced as the original closed service request. This new request's Type should be set as Routine Maintenance."

However, when attempting to verify the step, this is the error I get:

"Challenge Not yet complete... here's what's wrong: 
Inserting a new Maintenance Request of type 'Repair' and then closing it did not work as expected. The challenge was NOT expecting to find a Maintenance Request with the same Vehicle and the Status of 'New' and of Type 'Routine Maintenance'. However, it did."
Hello,

I've got a google script that I'd like to call using an Apex callout from Salesforce.

Now, I know how to implement OAuth authentication into this app. My question is this: is there a native way to store the tokens (refresh, access), or is this something I'd need to do with a custom object or custom setting?
I'm trying to verify the first step of the apex super badge, located here: https://trailhead.salesforce.com/en/super_badges/superbadge_apex

The requirements state: "When an existing maintenance request of type Repair or Routine Maintenance is Closed, you create a new maintenance request for a future routine checkup. This new request is tied to the same vehicle and piece of equipment to be serviced as the original closed service request. This new request's Type should be set as Routine Maintenance."

However, when attempting to verify the step, this is the error I get:

"Challenge Not yet complete... here's what's wrong: 
Inserting a new Maintenance Request of type 'Repair' and then closing it did not work as expected. The challenge was NOT expecting to find a Maintenance Request with the same Vehicle and the Status of 'New' and of Type 'Routine Maintenance'. However, it did."
Hello,

I've got a google script that I'd like to call using an Apex callout from Salesforce.

Now, I know how to implement OAuth authentication into this app. My question is this: is there a native way to store the tokens (refresh, access), or is this something I'd need to do with a custom object or custom setting?
I've created 2 custom objects. 1) "Bid Assets", and 2) "Assets". Assets is meant to be a repository for 200+ products we carry and are leased out to our customers. Bid Assets is the object that allows a user to create entries if one of the products is bid for an Opportunity. The Bid Assets object is displayed in the Opportunities page as a Related List, and a user is allowed to enter 1 or more Bid Assets, with their prices along with other custom information.

My question is, I am trying to create a new field on the Opportunity page that accesses the pricing from any Bid Assets that have been attached to the Opportunity, and calculate an amount. However, I don't see a way to access the information within this object from the Opportunity object.

Is there a way to draw the connection between Opportunity & Bid Asset objects so that they can access each other?
Hi,
  While reading about relationships in salesforce I found self relationship ( Lookup relation to same object) , so why this kind of relationship is required can anybody please explain with suitable scenario, and also please specify limitations of it.

Thanks in advance.
 
We are a non-profit who has multiple trips each year to developing countries to do medical and construction work (Rotary). Our volunteers pay to go on these trips. I set up each trip as a Campaign, each person on the trip is a Campaign Member (who is also a Contact record). I want to track payments made by each Campaign Member (there are installments of 3 to 4 payments).

I think I want to set up a master-child relationship between a custom object (e.g. Payments) and the Campaign Member. That way, I could roll-up the total payments to each member. Addtionally, since people (e.g. Contacts) travel on multiple trips, I could see the payment information at the Campaign Member level so each Contact would have multiple Campaigns and multiple Payments.

However, when I try to create a master-detail relationship between Payments and Campaign Member, the option to select Campaign Member as the master is not shown in the list of available objects. I could do Contact or Campaign, but I think I want the Campaign Member. Eventually I will have automated code that will create the Payments records and associate them with each Campaign Member when each Campaign Member pays on PayPal.

Ideas? Thanks so much!
I am getting the this error when I “Run The  Test Class”
*Error Details *

Error Message System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, eMa: execution of AfterInsert

caused by: System.NullPointerException: Attempt to de-reference a null object:

class.eMsgController.generateAutoresponse:line 32, coulmn1
trigger.eMa:line 6,column1:[]
stack trace: class.MyClass_TestClass.myUnitTest:line7,column 1

please help me out!!!!

Trigger.trgOrphanId: line 23, column 1: [] Stack Trace Class.testBatchDonorAllocation.myUnitTest: line 39, column 1
Hi I am useing below code to display multiple fields in a pageblock.
But I need span one field in two columns. How can I do this

<apex:pageblockSection title="Lead Details" columns="2"> 

<apex:outputField value="{!sellead.Description}" ><apex:inlineEditSupport event="ondblclick" 
            showOnEdit="saveButton, cancelButton" /></apex:outputField> 
Hi,

In a sandbox, I would like to send an email to some users when a particular action is done (i.e. in a trigger on a custom object).

First of all, I configured the access level to "All Emails" in Email Administration > Deliverability.
Then, I use the classic Messaging class/namespace in my trigger :
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
//Test
toAddresses = new List<String> {'some.email@test.com'};

mail.setToAddresses(toAddresses);
mail.setReplyTo('no-reply@test.com');
mail.setSubject('subject');
mail.setPlainTextBody('Test message... Again.');
mail.setHtmlBody('Test message... <br/> <i>Again</i>.');

Messaging.SendEmailResult[] results = Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail }, false);
System.debug('Email invocations : ' + Limits.getEmailInvocations());
	
//errors
List<Messaging.SendEmailError> errors = new List<Messaging.SendEmailError>();
for(Messaging.SendEmailResult currentResult : results) {
	System.debug('Success : ' + currentResult.isSuccess());
}
In my debug logs, I clearly read "Success : true" for each mail this function has to send. But in my mailbox, nothing to read.
I also logged the number of sent emails with "Limits.getEmailInvocations()". It always increases...

In some forums, I read that it could be a problem with the sandbox (https://developer.salesforce.com/forums/ForumsMain?id=906F000000091ECIAY). Any idea or experience here ?

Thanks !
I'm working with a large organization that has thousands of dashboards and reports some of which need to be updated. My plan was to import them into eclipse in order to identify and update the relevant ones, but I'm having trouble importing some of them. I've tried several variations of creating and refreshing projects (some projects with just one folder to rule out any data limitations) but for some reason some reports and dashboards just do not show up in their folders. I can see the reports when I try to add/remove components from eclipse (so there shouldn't be any issue with permissions) but after the import they aren't there. Likewise they are displayed as <members> in the package.xml file but do not appear in the tree. Has anyone else run into this issue or able to propose a workaround? 
  • December 11, 2014
  • Like
  • 0
Is it possible to query the field level securities associated with a profile?

Please let me know
Hi,
Can any one help me in converting String to DateTime in apex.
Im able convert below format.

DateTime dt = DateTime.parse('11/6/2014 12:00 AM');

If I use below format Im getting error.

Datetime dt = DateTime.formatGmt('09-Dec-2014 10:43 AM');

System.TypeException: Invalid date/time: 09-Dec-2014 10:43 AM.

Thanks in advacne.

Regards,
naveen.


 
Looking to get contract help with the below - I'm not a developer, let me know if anyone is interesting in the below project based work.

Objects Referenced
Opportunity
Opportunity Line Items
Payments (custom object that is detail to Opportunity)
 
I’m looking to generate a VisualForce email template so we can send invoices to our clients. The invoice will be generated from the Payment record. 
 
On the invoice, I will display Payment fields (not an issue). But I also want to display the Opportunity Line Items from the related Opportunity record. This is where I’m running into an issue.
 
What I’ve tried is using my VisualForce template on payment object and placing an iframe (the iframe is another VisualForce page that displays the necessary Opportunity Line Items). This worked, however, I need the attachment in the Invoice email to be rendered as a PDF. Iframes are not supported in PDFs.
 
This is where I realized I need a custom controller and DEV help.