• bkradmin
  • NEWBIE
  • 0 Points
  • Member since 2013

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

I am a beginner admin, so this question may be way above my pay grade, but here goes: Is there any way, using a custom formula or button or some other non-code based tool, for me to get a field populated with a specific piece of data from a specific URL? For example, let's say I want to populate a "Billing City" field with the information I get from a URL. So I went to the URL, looked at the page source, and got this line of data which displays the city I want: "</span><br /><span itemprop="addressLocality">Toronto</span>". How do I instruct Salesforce to take that name; i.e. "Toronto", and put it in my field?

Normally, after an Opportunity is created, a Payment is automatically created with it. We rely heavily on this function. For some reason, this stopped working spontaneously. No settings were changed to my knowledge. Can anyone suggest where we can look? 

I am getting an error on a test class that I am not understanding: "First exception on row 0; first error: FIELD_FILTER_VALIDATION_EXCEPTION, Value does not exist or does not match filter criteria.: [Hospital__c]" 

 

Can anyone help?

 

Here is the test class:

 

@isTest
private class TestHospitalization {
static testMethod void myUnitTest() {
     //make Contact
     Date sdate1=date.today();
     sdate1=sdate1-1;
     Date sdate2=sdate1.addMonths(3);
        Contact NewCont = new Contact (FirstName='Test', LastName='Name');
       insert NewCont;
       Account NewAcct = new Account (Name='Test');
       insert NewAcct;
       Hospitalization__c NewHosp = new Hospitalization__c (Client__c=NewCont.Id, Hospital__c=NewAcct.Id,Date_of_admission__c=sdate1);
       insert NewHosp;
       Hospitalization__c NewHosp2 = new Hospitalization__c (Client__c=NewCont.Id, Hospital__c=NewAcct.Id,Date_of_admission__c=sdate2);
       insert NewHosp2;
       NewHosp.Bed__c='1';
       update NewHosp;
       NewHosp.Date_of_admission__c=sdate2;
       update NewHosp;
   }
}

 And here is the trigger:

 

trigger CurrentHospital on Hospitalization__c (after update,after insert) {
List <Contact> UpCont=new List <Contact>();
//List <Contact> TestCont=new List <Contact>();
List <Id> TestCont=new List <Id>();
List <Contact> YesCont=new List <Contact>();

Set <Contact> MyCont=new Set <Contact>();
Map <Id, Hospitalization__c> ContHosp=new Map<Id,Hospitalization__c>();
Contact thisCont=new Contact();
//Id thisCont=new Id();
for (Hospitalization__c l : Trigger.new) {
  //thisCont=l.Client__c;
  TestCont.add(l.Client__c);
}
if(TestCont.size()>0){
    List <Hospitalization__c> HasHosp=[SELECT Client__r.Name,Client__r.Hospitalization__c,Id,Currently_in_Hospital__c FROM Hospitalization__c WHERE Client__c IN :TestCont ORDER BY Currently_in_Hospital__c ASC];
        for (Hospitalization__c b: HasHosp){
          thisCont=b.Client__r;
          if(MyCont.contains(thisCont)){
             MyCont.remove(thisCont);
      }
        if(b.Currently_in_Hospital__c==0&&thisCont.Hospitalization__c!=null){
          thisCont.Hospitalization__c=null;
          MyCont.add(thisCont);
        } else if(b.Currently_in_Hospital__c==1) {
          thisCont.Hospitalization__c=b.Id;
          MyCont.add(thisCont);
        }
        
      }
      if(MyCont.size()>0){
      UpCont.addAll(MyCont);
      }
    /*for (Integer i=0; i < TestCont.size(); i++){
        if(TestCont[i].Hospitalization__c==null){
            UpCont.add(TestCont[i]);
        }
    }*/
}

  
if(UpCont.size()>0){
update UpCont;//all contacts should be updated one way or the other
}
}

 

I'll try to keep this as brief as possible:

 

We are a Canadian non-profit which needs to send tax-deductible receipts to our donors once a year. Each receipt has a unique receipt number, but can have multiple donations listed on each. 

 

We have all the data set up from the Salesforce side (donation objects, automatic assignment of receipt numbers, etc.). Now we are thinking about output. The quickest way we have now to get the data on actual paper is to run a report with our donation information, receipt numbers, and donor information, export it to excel, and then set up a complicated mail merge document we created that understands how to group donations by receipt number to create pages. 

 

This is obviously not ideal. We would like to do all the document creation within Salesforce. I think this is too customized for the doc creation apps, and anyways we don't like monthly subscriptions. 

 

We are wiling to invest in creating something to ease this process, but we don't have an idea about wha tthat would look like. Does anyone have any idea what would be involved in doing this all in Salesforce? Are we talking about VF pages? If so, what would the procedure be?

 

 

Hi, I am very new to formulas and SF and can't seem to get SF syntac right. I keep getting errors on this formula. I would really appreciate some help! 

 

If ((RecordType.Id), ("012E0000000MoYF") || ( RecordType.Id), ("012E0000000Mu8O") || ( RecordType.Id), ("012E0000000MoYN") || ( RecordType.Id), ("012E0000000MoYQ")),
( IF(ISPICKVAL(npe01__PreferredPhone__c, "Home"), HomePhone,
IF(ISPICKVAL(npe01__PreferredPhone__c, "Other"), OtherPhone,
IF(ISPICKVAL(npe01__PreferredPhone__c, "Work"), npe01__WorkPhone__c,
IF(ISPICKVAL(npe01__PreferredPhone__c, "Mobile"), MobilePhone, Account.Phone
),
( IF(ISPICKVAL(npe01__PreferredPhone__c, "Home"), HomePhone,
IF(ISPICKVAL(npe01__PreferredPhone__c, "Other"), OtherPhone,
IF(ISPICKVAL(npe01__PreferredPhone__c, "Work"), npe01__WorkPhone__c,
IF(ISPICKVAL(npe01__PreferredPhone__c, "Mobile"), MobilePhone, Employer_Number__c
)