• pj_27
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 18
    Replies

Hi,

 

I am writing a trigger on campaignmember where I need to find if a campaignmember was added to a diffrent campaign in past 60 days.

if the campaignmember was not added to a diffrent campagin in past 60 days I need to update the owner of the assiciated lead's or contact's owner to the particular user.

 

1. I am not sure how to achive this - can anyone please guide me on this ?

 

2.Is this a correct object to write a trigger and accomplish this requirement ?

 

3. Also I ran a report  in which there is a field - 'Member First Associated date'. is this a standard field on campaign/ campaignmember ? if yes then is it a created date ?

 

Please suggest.

 

Thanks in advance,

pj_27

 

  • February 21, 2012
  • Like
  • 0

Hi,

 

I am getting a following error for my VF page.this page was working fine previously.

 

internal server error occured.

 

" An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that ........."

 

I guess theres something wrong in script of the page and Error console for this web page displays following errors.

 

"SFDC not defined"

 

"SFDCApp not defined"

 

 

Please suggest.

 

 

 

  • January 23, 2012
  • Like
  • 0

Hi,

 

I have developed a VF page by using yahoo CSS and I have implemented a model dialogue.

 

In the page code on click of  'ok' button I am opening a pop up model dialouge where user selects the projects and then on next screen he will save OpportunityLineItem data for the selected projects.

 

The action method fails below 

this button is the part of the form which appears after the yahoo pop up window.

on button <apex:commandButton id="btn_conti" value="{!$Label.Continue}" action="{!testmethd}" /> 

 

I tried putting my page code here  but system does not allows me to enter due to exceeding the characters.

 

Please suggest.

 

 

 

  • January 04, 2012
  • Like
  • 0

Hi , I am new to web services ... I am trying to consume a service and get the project details by calling a method from a WSDL generated class.

 

Here class SalesOffering is WSDL generated class and Service1Soap is inner class of SalesOffering. The method below  GetProjectsForOpportunity('Sales','sdfsdfdfs','3453636') is defined in Service1Soap class.  method takes 3 parameter and it should generate a proper response . I tried to consume this service in .NET and it was a success. 

 

Here is the code which I used in System log to get results. 

 

SalesOffering.Service1Soap obj = new SalesOffering.Service1Soap();
SalesOffering.GetProjectsForOpportunityResult_element ele =obj.GetProjectsForOpportunity('Sales','sdfsdfdfs','3453636');

System.debug(ele);

 

and I got the error - System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element SalesService

 

Please help me. Thanks in advance ...

 

  • December 18, 2011
  • Like
  • 0

Hi,

I am a beginner with apex scheduling and I want to send email to the contacts on their respective birthdays.

I have developed a code but somehow it is not working.

Any help or suggestion appreciated. Thank you in advance.

 

******************************************************************************

Code  -

******************************************************************************

global class ContactmailScheduler implements Schedulable
{
    global void execute(SchedulableContext ctx)
    {
           SendMassEmail Objsme = new SendMassEmail();
           Objsme.sendmail();
    }     
        
}

******************************************************************************

public with sharing class SendMassEmail   
{
    List<Id> ConIdList = new List<Id>();
        
    public void sendmail()
    {
        ContactmailScheduler nd = new ContactmailScheduler();  
        String asd = '0 0 13 * * ?';
        System.schedule('Send mail',asd,nd);
    
        List<Contact> cntlst = [Select c.Birthdate,c.Id,c.Name from Contact c where c.active__c =true AND
        c.Birthdate = THIS_MONTH ];
          
          if(cntlst.Size()> 0 )
        {
            for(Contact objCon : cntlst )
              {    
                  if(objCon.Birthdate.day()== Date.today().day())
                   ConIdList.add(objCon.Id);
              }
        }
            
        Messaging.MassEmailMessage mail = new Messaging.MassEmailMessage();
        mail.setTargetObjectIds(ConIdList);
        mail.setTemplateId('00X90000000SuQ8');
        mail.setUseSignature(true);
        Messaging.sendEmail(new messaging.Massemailmessage[] {mail});    
    }
                
}

  • June 02, 2011
  • Like
  • 0

Hi,

 

I have an Object 'Pursuit_Plan__c' which has a lookup field -'Opportunity_Name__c'  on opportunity.

 

I am inserting records of object 'Pursuit_Plan__c'  in bulk with the Opportunities associated -(  Pursuit_Plan__c.Opportunity_Name__c  = Not empty), and this insert is success.

 

Now when I  am updating these records in bulk by removing the opportunity association-(  Pursuit_Plan__c.Opportunity_Name__c  = empty in CSV file).

 

This bulk update shows success message, However  these records of the Pursuit_Plan__c  still has an association with the Opportunities.And none of the updated Pursuit_Plan records have the null or empty field for the 'Opportunity_Name__c'.

 

Please help.

  • May 12, 2011
  • Like
  • 0

Hi,

  am trying to save a VF page but it is continuously giving an error of "Unable to solve on all files:UNKNOWN _EXCEPTION"An unexpected error occured.It requires to save this page for two times

.I think it is generating an error for VF page and as well as for its meta file.

Help please.

  • April 29, 2011
  • Like
  • 0

Hi

 

I am writing a test class for the trigger that populates Proposed Opportunity Owner field (ProposedOpportunityOwner__c) with the Opportunity owner name. Trigger fires only if the user belongs to the Canada profile.This trigger is working fine and the field ProposedOpportunityOwner__c  is populated with the Opportunity Owner name.

 

In a test class I have created a Canada user and inserted an Opportunity in that users context.However for this inserted Opportunity I am getting the NULL value for ProposedOpportunityOwner__c field.

 

Please suggest.Thanks.

 

 

  • March 18, 2011
  • Like
  • 0

Hi,

 

I am writing a trigger on campaignmember where I need to find if a campaignmember was added to a diffrent campaign in past 60 days.

if the campaignmember was not added to a diffrent campagin in past 60 days I need to update the owner of the assiciated lead's or contact's owner to the particular user.

 

1. I am not sure how to achive this - can anyone please guide me on this ?

 

2.Is this a correct object to write a trigger and accomplish this requirement ?

 

3. Also I ran a report  in which there is a field - 'Member First Associated date'. is this a standard field on campaign/ campaignmember ? if yes then is it a created date ?

 

Please suggest.

 

Thanks in advance,

pj_27

 

  • February 21, 2012
  • Like
  • 0

Hi,

 

I am getting a following error for my VF page.this page was working fine previously.

 

internal server error occured.

 

" An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that ........."

 

I guess theres something wrong in script of the page and Error console for this web page displays following errors.

 

"SFDC not defined"

 

"SFDCApp not defined"

 

 

Please suggest.

 

 

 

  • January 23, 2012
  • Like
  • 0

Hi,

 

I have developed a VF page by using yahoo CSS and I have implemented a model dialogue.

 

In the page code on click of  'ok' button I am opening a pop up model dialouge where user selects the projects and then on next screen he will save OpportunityLineItem data for the selected projects.

 

The action method fails below 

this button is the part of the form which appears after the yahoo pop up window.

on button <apex:commandButton id="btn_conti" value="{!$Label.Continue}" action="{!testmethd}" /> 

 

I tried putting my page code here  but system does not allows me to enter due to exceeding the characters.

 

Please suggest.

 

 

 

  • January 04, 2012
  • Like
  • 0

Hi , I am new to web services ... I am trying to consume a service and get the project details by calling a method from a WSDL generated class.

 

Here class SalesOffering is WSDL generated class and Service1Soap is inner class of SalesOffering. The method below  GetProjectsForOpportunity('Sales','sdfsdfdfs','3453636') is defined in Service1Soap class.  method takes 3 parameter and it should generate a proper response . I tried to consume this service in .NET and it was a success. 

 

Here is the code which I used in System log to get results. 

 

SalesOffering.Service1Soap obj = new SalesOffering.Service1Soap();
SalesOffering.GetProjectsForOpportunityResult_element ele =obj.GetProjectsForOpportunity('Sales','sdfsdfdfs','3453636');

System.debug(ele);

 

and I got the error - System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element SalesService

 

Please help me. Thanks in advance ...

 

  • December 18, 2011
  • Like
  • 0

Hi,

 

I have an Object 'Pursuit_Plan__c' which has a lookup field -'Opportunity_Name__c'  on opportunity.

 

I am inserting records of object 'Pursuit_Plan__c'  in bulk with the Opportunities associated -(  Pursuit_Plan__c.Opportunity_Name__c  = Not empty), and this insert is success.

 

Now when I  am updating these records in bulk by removing the opportunity association-(  Pursuit_Plan__c.Opportunity_Name__c  = empty in CSV file).

 

This bulk update shows success message, However  these records of the Pursuit_Plan__c  still has an association with the Opportunities.And none of the updated Pursuit_Plan records have the null or empty field for the 'Opportunity_Name__c'.

 

Please help.

  • May 12, 2011
  • Like
  • 0

Hi,

  am trying to save a VF page but it is continuously giving an error of "Unable to solve on all files:UNKNOWN _EXCEPTION"An unexpected error occured.It requires to save this page for two times

.I think it is generating an error for VF page and as well as for its meta file.

Help please.

  • April 29, 2011
  • Like
  • 0

Hi

 

I am writing a test class for the trigger that populates Proposed Opportunity Owner field (ProposedOpportunityOwner__c) with the Opportunity owner name. Trigger fires only if the user belongs to the Canada profile.This trigger is working fine and the field ProposedOpportunityOwner__c  is populated with the Opportunity Owner name.

 

In a test class I have created a Canada user and inserted an Opportunity in that users context.However for this inserted Opportunity I am getting the NULL value for ProposedOpportunityOwner__c field.

 

Please suggest.Thanks.

 

 

  • March 18, 2011
  • Like
  • 0

hi,

I'd like to enforce my users not to leave the lead in default status after they could reach the customer. Depending on the call the new status can be divers, so I need to open a picklist-values-choosing page.
It would be great to get it directly from the trigger or I could set a checkbox field and create a workflow rule on it, so the next time the users open the lead they have to set the new status.

Is there any way to open a visualforce page from a trigger?

Hi

 

I have created a visualforce page with contentType="application/vnd.ms-powerpoint".

 

I want to know how to provide a "slide-break" (not sure if that's the right term to be used) in order to specify the content in different number of slides.

 

Because right now, irrespective of the size of the visualforce page, the entire page content falls into just a single slide.

 

I would appreciate any help on this issue.

 

Thanks,

 

Suri

  • June 17, 2009
  • Like
  • 0

Hi,

 

I want to create a trigger that fires after an opportunity will be updated.

First the trigger has to check, if specified fields in the opportunity has changed. If so, the trigger has to log this changes into a new simple custom object (text only).

I wrote my code and the first part works very well:

 

trigger HistoryOpportunityV001_test on Opportunity (after update) { // no bulk processing; will only run from the UI if (Trigger.new.size() == 1) { String strChanges = ''; //// Checking fields if the value has changed // 1. Field: Opportunity.Name if (Trigger.old[0].Name != Trigger.new[0].Name) { cnt++; strChanges += cnt + '. <Name>: "' + Trigger.old[0].Name + '" -> "' + Trigger.new[0].Name + '"\n'; } // 2. Field: Opportunity.Order_ID__c if (Trigger.old[0].Order_ID__c != Trigger.new[0].Order_ID__c) { cnt++; strChanges += cnt + '. <Order_ID__c>: "' + Trigger.old[0].Order_ID__c + '" -> "' + Trigger.new[0].Order_ID__c + '"\n'; } if (cnt > 0) { OpportunityLog__c oppLog = new OpportunityLog__c( OpportunityID__c = Trigger.old[0].Id, OpportunityName__c = 'oppName', OpportunityChangesUser__c = UserInfo.getUserId(), Changes__c = strChanges ); insert oppLog; } } }

 

 

 

Now I want to implement, that the trigger will check if the value of some specific fields of the updated opportunitys line items (products in the opportuity) has changed. If so, I want to log this lineitems field changes, too.

I know that I have to loop through all line items and have to check the field values.

- BUT HOW CAN I DO THIS?

 

Could anyone help me, please? It would be great if you post me your code or ideally complete the existing code ;)

 

Next... I want to log if the user adds a new product/lineitem or deletes a lineitem.

 

Any ideas?

 

Thanks a lot,

jup