• tonante27
  • NEWBIE
  • 65 Points
  • Member since 2011
  • Software Developer

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 20
    Replies
Hi folks,
can someone help on how to pass contact Lookup filed value through webservicies......
i can able to pass all the values except  Lookup field contact value based on personal number .
can some one please check and let me know how can i pass lookup field value based on personal number .....Thanks
please see below code and result screenshot...
global class IVRObjWebservice
{
    webservice static Id createIVRRecord(String CallerID, String ContactChannel,String ContactIntent,String AuthenticationResult,
                                         String AutomatedTaskCompleted,String dob,String DNIS,String enddate,
                                         String LanguagePreference,String SeqMemberID,String SSN,String startdate,
                                         String subscriberId,String SubscriberPlanID,String SubscriberType,String SurveyOption,
                                         String TransferedTo,String ccChannelDuration,String ivrjourney)
    {
IVR_Journey__c con = new IVR_Journey__c();
con.Caller_ID__c = Integer.valueOf(CallerID);         
con.Seq_Member_ID__c = Integer.valueOf(SeqMemberID);  
con.DNIS__c = Integer.valueOf(DNIS);
con.Start_Date_Time__c = Datetime.valueOf(startdate);        
con.End_Date_Time__c = Datetime.valueOf(enddate); 
con.Contact_Channel__c = ContactChannel;
con.Contact_Channel_Duration__c = ccChannelDuration;
Contact contact = new Contact (Id = con.Ivr_Journey__c);      ( i think this line code is wrong)
insert con;
return con.id;


}
User-added image
i created correctly lookup relation ship between contact and custom object(IVR_journey_c) .....
User-added image

 
  • June 18, 2018
  • Like
  • 0
Help please!:  I have successfully created two different combo boxes in a lightning component. The first one displays account records using autocompletion while the second combo box displays user records  using autocompletion. However when I type a user's name in the second combo box I notice that not only do I get a list of user records underneath the second (User) combo box, but I also get that same list of user records listed underneath the first (Account)  combo box. I only want the dynamic list to appear underneath the second (User) combo box when I am searching for a specific group of users when using autocompletion .  Thanks. Let me know if you need additional code. 
 
Hi , I have run into a dilemma.  There is a contact lightning page that we use for both System Admins as well as non-System Admins.  The issue is that for System Admins they have a Global Action button displayed when the page loads while the non-System Admin Profiles use another button for this page which is defined in the Salesforce Classic Contact Buttons' LInks, and Action section in Setups with a lightning component that is marked as overriden. However both of these buttons bring up their respective component pages when clicked and they also load in data from what appears to be the same Apex controller(s?). The Java Script controllers call the same Aura Apex methods so my question is:

Q) Is it possible that both components could be tied to one Apex class ?
Q) Does Lightning know where to find the correct methods from a class when the Java Script controller  - for each of these components  - calls those methods?   Thanks
Help:  

I am getting this  error but not sure why because of these steps:
1) Create a component in order to add a plugin for Address Verification called Smarty Streets
2) The component includes both Address fields for Billing/SHipping as well as Crtedit Card Payment fields
3) Among those fields listed within the component, I have included both the controlling picklist (Payment Method)  and its dependent picklist (Card Type)
4) Add the component to the main page.
5) Make sure that e both fields mentioned in step 3  have Read/Write access and are visiable.
6) Bring up the Apex Page
7) Verify that this error occurs.

Why am I getting this error if I am including both those fields?  

 Thanks

HI. I need help to determine a possible bug:

I am attempting to run the Android CloudTunes App but my problem is different that the previous post at http://boards.developerforce.com/t5/Mobile/Unable-to-run-the-android-sample-cloud-tunes-app/m-p/485461#M914.
I use www,github.com's version of CloudItunes app. Here are my setup steps:

 

0. Set up Eclipse Helios with the Android ADT bundle and using Android SDK manager set up all included files needed with Android ver 2.2
1. I cloned the directory for GitHub's Sales Force mobile SDK
2. I have JDK 1.7 installed
3. I'm Running Windows 7
4. I ran the cscript install

5. When I load Eclipse, I get an error indicating that the "gen" directory did not build.
6. I Looked at the src code and verified that the "gen" folder is not being built and thus the com.Salesforce.androidsdk Rest , App, and Utility class files are not being included (imported) within the CloudTunes java class files
like AlbumListActivity.java when the project is uploaded into eclipse. However; The android.widget library file is Ok.

Q) I am not sure what is wrong. Has anyone experienced this problem too?
Q) Do I need to create a gen sub directory under com.salesforce.androidsdk and add some sort of build file and then rebuild using Eclipse?

 

 Thanks much for your help.

HI,

I have to write code that takes a list of  of International CLubs and calculates a forecast registration count per each member of that club for a grand total.  My problem is that I am facing governor limits on a simple query but it does return  roughly 4K records before being fed into an Apex Controller to display 300 records per page.  What can I do to avoid hitting these limits?  Do I need to Bulkify more?  How?  Here is the code and thanks much for your help (I have highlighted  the SOQL statement in Bold ):

public class AccountsCTRL_New
{
    String CountryName = '';
    Boolean NextClick = false;
    Boolean PrevClick = false;    
   // public List<Account> ClubberAccounts = new List<Account>();
 
    public PageReference churchInfo()
    {      
        try
        {
        NextClick = false;
        prevClick = false;
        CountryName  = Apexpages.currentPage().getParameters().get('name');
  
                                                                                                                              
        }
        catch(Exception e)
        {
            ApexPages.addMessages(e);
        }             
        return null;
    }
    
    
public ApexPages.StandardSetController setCon
     {
        get
        {   
           if(setCon == null)
           {  
           List<account> accountList = new List<Account>();
               setCon  = new ApexPages.StandardSetController(accountList);                                                           
           }
           else
           {                  
            if(CountryName != '' )  //BELOW IS THE PROBLEM SOQL STATEMENT
            {  
                if( NextClick == false && PrevClick == false)                
                setCon = new ApexPages.StandardSetController(Database.getQueryLocator(
                                                  [SELECT Id,
                                                          Name,
                                                          Territory__c,
                                                          Mailing_City__c,
                                                          ClubberCount__c,
                                                          Mailing_Address_Book__c,
                                                          ccountTest__c,
                                                          Type
                                                   FROM Account
                                                   WHERE Territory__c =: CountryName
                                                   AND Customer_Type__c =: 'International Church'  
                                                   ]));
                                                   
             }                                                                                                                                                                                            
                 setCon.setPageSize(300);                                                                         
           }
           return setCon;
        }
        set;
    }
    
    public List<Account> getAccounts()
    {
         return (List<Account>) setCon.getRecords();        
    }
    
    public PageReference PrevList()
    {       
     if(setCon.getHasPrevious()){
         setCon.previous();
        PrevClick = true;   
        }                                        
        return null;
    }
    
    public PageReference NextList()
    {                  
      if(setCon.getHasNext()){
            setCon.next();
      NextClick = true;
          }
       return null;
    }             

        

}

 

 

Hi,

 

I have a remote HTML page that uses a link to pass a parameter to an Apex controller in order for that controller to run a SOQL query using the parameter which will then display the list of returned values to a Visual Force Page. I researched this scenario and I discovered that I could use either a WSDL or Ajax Toolkit to allow the remote HTML to login to Sales Force using the JQuery login() and sf.connect().  I decided to use Ajax Toolkit. (If there is an easier way to go about this procedure please let me know)

 

My Question is this:

 

1) How can I go about encrypting the login parameters within my JQuery library file? I thinking the password and userid are going to be exposed and that could be risky.

 

Thanks much for your help.

 

Is there any way that I can call  <apex:repeat>   from a command button (that sits within a <apex:pageBlockButtons> tag ) in order to store the output in an Excel spreadsheet? How do I associate the command button with this reapeat tag? Here is the code segment where I am having problems using the repeat tag. (variable lstwrapper is a List<Wrapper> amd wrapper is a class). Thanks much for your help and advice.:

 

 

 

<apex:pageBlock title="Subscription Issues">
    
    <apex:pageBlockButtons >
       <div style="display:inline; padding-left:10%; " id="SubscriptionSpacer1"></div>
            <apex:commandButton value="Get Subscriptions!" action="{!GetQuerySubscriptions}"  status="status"  />
           <apex:commandButton value="Decrement Subscriptions!" action="{!decrementAllIssues}" />
           <apex:commandButton value="Export to Excel" action="{!ExportToExcel}">            
               <apex:pageBlockTable>
                 <apex:repeat value="{!lstwrapper}" var="w">
                     <apex:outputText value="{!w.sid}" />
                     <apex:outputText value ="{!w.acctId}" />
                     <apex:outputText value="{!w.mAttention}"/>
                     <apex:outputText value="{!w.Street1}" />
                     <apex:outputText value="{!w.Street2}" />
                     <apex:outputText value="{!w.Street3}" />
                     <apex:outputText value="{!w.state}" />
                     <apex:outputText value="{!w.zip}" />
                     <apex:outputText value="{!w.name}" />
                     <apex:outputText value="{!w.productName}" />
                     <apex:outputText value="{!w.description}" />
                     <apex:outputText value="{!w.qty}" />
                     <apex:outputText value="{!wlrdate}" />
                     <apex:outputText value="{!w.numissues}" />
                     <apex:outputText value="{!w.lissuessent}" />
                  </apex:repeat>
               </apex:pageBlockTable>
         </apex:commandButton>
    </apex:pageBlockButtons>

 

 

 

Help please!:  I have successfully created two different combo boxes in a lightning component. The first one displays account records using autocompletion while the second combo box displays user records  using autocompletion. However when I type a user's name in the second combo box I notice that not only do I get a list of user records underneath the second (User) combo box, but I also get that same list of user records listed underneath the first (Account)  combo box. I only want the dynamic list to appear underneath the second (User) combo box when I am searching for a specific group of users when using autocompletion .  Thanks. Let me know if you need additional code. 
 
Hi folks,
can someone help on how to pass contact Lookup filed value through webservicies......
i can able to pass all the values except  Lookup field contact value based on personal number .
can some one please check and let me know how can i pass lookup field value based on personal number .....Thanks
please see below code and result screenshot...
global class IVRObjWebservice
{
    webservice static Id createIVRRecord(String CallerID, String ContactChannel,String ContactIntent,String AuthenticationResult,
                                         String AutomatedTaskCompleted,String dob,String DNIS,String enddate,
                                         String LanguagePreference,String SeqMemberID,String SSN,String startdate,
                                         String subscriberId,String SubscriberPlanID,String SubscriberType,String SurveyOption,
                                         String TransferedTo,String ccChannelDuration,String ivrjourney)
    {
IVR_Journey__c con = new IVR_Journey__c();
con.Caller_ID__c = Integer.valueOf(CallerID);         
con.Seq_Member_ID__c = Integer.valueOf(SeqMemberID);  
con.DNIS__c = Integer.valueOf(DNIS);
con.Start_Date_Time__c = Datetime.valueOf(startdate);        
con.End_Date_Time__c = Datetime.valueOf(enddate); 
con.Contact_Channel__c = ContactChannel;
con.Contact_Channel_Duration__c = ccChannelDuration;
Contact contact = new Contact (Id = con.Ivr_Journey__c);      ( i think this line code is wrong)
insert con;
return con.id;


}
User-added image
i created correctly lookup relation ship between contact and custom object(IVR_journey_c) .....
User-added image

 
  • June 18, 2018
  • Like
  • 0
I need to bulkify a trigger which utilizes a trigger handler, and am not sure how to actually call the trigger handler while using a if statement, I only need to call the trigger handler on the records that meet a specific criteria but do not know how to do it with out a for loop and calling the trigger handler multiple times.  Can someone give help me out?  My code is below.

  for(task t: trigger.new){
                  system.debug('after trigger fired');
                  if(t.status == 'Completed' && t.Primary_Campaign__c != Null && t.Primary_Campaign__r.Actionable__c == true){
                    taskTriggerHandler.updateActionableLeads(Trigger.new);
                  }
                  if(t.Follow_Up_Id__c != Null){
                    taskTriggerHandler.followUPTaskUpdate(Trigger.new);
                 }
               }
Help:  

I am getting this  error but not sure why because of these steps:
1) Create a component in order to add a plugin for Address Verification called Smarty Streets
2) The component includes both Address fields for Billing/SHipping as well as Crtedit Card Payment fields
3) Among those fields listed within the component, I have included both the controlling picklist (Payment Method)  and its dependent picklist (Card Type)
4) Add the component to the main page.
5) Make sure that e both fields mentioned in step 3  have Read/Write access and are visiable.
6) Bring up the Apex Page
7) Verify that this error occurs.

Why am I getting this error if I am including both those fields?  

 Thanks
I'm getting the same error even though I'm using the code provided by other users here. The new field is also created.
 
trigger AccountAddressTrigger on Account (before insert, before update) {
    for(Account a : Trigger.new){
        If (a.Match_Billing_Address__c == true) {
            a.ShippingPostalCode = a.BillingPostalCode;
        }   
    }
}

Is there anything wrong with it? 

Thanks in advance.
Hello everyone, I've been working on this challenge in the Date Security portion of Trailhead for some time but need some help (See below)

The challenge requires a profile to be created with the following traits:
    Name: Account Reviewer
    Salesforce license type
    Only read access to Account object. (And no access to any other object in the Org)

Understand that I did read the indepth reading before hand and I created a read-only clone profile in the Accounts profile list but am stuck as how to proceed from there. Challenge error states: Challenge not yet complete ... here's what's wrong: The 'Account Reviewer' profile does not work as expected. Please Advise.

HI. I need help to determine a possible bug:

I am attempting to run the Android CloudTunes App but my problem is different that the previous post at http://boards.developerforce.com/t5/Mobile/Unable-to-run-the-android-sample-cloud-tunes-app/m-p/485461#M914.
I use www,github.com's version of CloudItunes app. Here are my setup steps:

 

0. Set up Eclipse Helios with the Android ADT bundle and using Android SDK manager set up all included files needed with Android ver 2.2
1. I cloned the directory for GitHub's Sales Force mobile SDK
2. I have JDK 1.7 installed
3. I'm Running Windows 7
4. I ran the cscript install

5. When I load Eclipse, I get an error indicating that the "gen" directory did not build.
6. I Looked at the src code and verified that the "gen" folder is not being built and thus the com.Salesforce.androidsdk Rest , App, and Utility class files are not being included (imported) within the CloudTunes java class files
like AlbumListActivity.java when the project is uploaded into eclipse. However; The android.widget library file is Ok.

Q) I am not sure what is wrong. Has anyone experienced this problem too?
Q) Do I need to create a gen sub directory under com.salesforce.androidsdk and add some sort of build file and then rebuild using Eclipse?

 

 Thanks much for your help.

HI,

I have to write code that takes a list of  of International CLubs and calculates a forecast registration count per each member of that club for a grand total.  My problem is that I am facing governor limits on a simple query but it does return  roughly 4K records before being fed into an Apex Controller to display 300 records per page.  What can I do to avoid hitting these limits?  Do I need to Bulkify more?  How?  Here is the code and thanks much for your help (I have highlighted  the SOQL statement in Bold ):

public class AccountsCTRL_New
{
    String CountryName = '';
    Boolean NextClick = false;
    Boolean PrevClick = false;    
   // public List<Account> ClubberAccounts = new List<Account>();
 
    public PageReference churchInfo()
    {      
        try
        {
        NextClick = false;
        prevClick = false;
        CountryName  = Apexpages.currentPage().getParameters().get('name');
  
                                                                                                                              
        }
        catch(Exception e)
        {
            ApexPages.addMessages(e);
        }             
        return null;
    }
    
    
public ApexPages.StandardSetController setCon
     {
        get
        {   
           if(setCon == null)
           {  
           List<account> accountList = new List<Account>();
               setCon  = new ApexPages.StandardSetController(accountList);                                                           
           }
           else
           {                  
            if(CountryName != '' )  //BELOW IS THE PROBLEM SOQL STATEMENT
            {  
                if( NextClick == false && PrevClick == false)                
                setCon = new ApexPages.StandardSetController(Database.getQueryLocator(
                                                  [SELECT Id,
                                                          Name,
                                                          Territory__c,
                                                          Mailing_City__c,
                                                          ClubberCount__c,
                                                          Mailing_Address_Book__c,
                                                          ccountTest__c,
                                                          Type
                                                   FROM Account
                                                   WHERE Territory__c =: CountryName
                                                   AND Customer_Type__c =: 'International Church'  
                                                   ]));
                                                   
             }                                                                                                                                                                                            
                 setCon.setPageSize(300);                                                                         
           }
           return setCon;
        }
        set;
    }
    
    public List<Account> getAccounts()
    {
         return (List<Account>) setCon.getRecords();        
    }
    
    public PageReference PrevList()
    {       
     if(setCon.getHasPrevious()){
         setCon.previous();
        PrevClick = true;   
        }                                        
        return null;
    }
    
    public PageReference NextList()
    {                  
      if(setCon.getHasNext()){
            setCon.next();
      NextClick = true;
          }
       return null;
    }             

        

}

 

 

Hi All,

I have a requirement I need to change opportunity owner and assign Read acces to old user in opportunityshare object

what I did i am changing a owner with the help of workflow where owner is changed after changing stage .

for providing read acces i have created trigger and that trigger giveing a issues

Please check it -

 

trigger UpdateOpportunityOwner on Opportunity (after update) {
list<OpportunityShare> updateOpportunityShare = new list<OpportunityShare>();
list<OpportunityShare> lstOpportunityShare = [Select UserOrGroupId, OpportunityId, OpportunityAccessLevel,Id From OpportunityShare where OpportunityId =: Trigger.new];
system.debug('lstOpportunityShare'+lstOpportunityShare);

for(Opportunity o:Trigger.new)
{
if(o.OwnerId != trigger.oldmap.get(o.id).OwnerId)
{
for(OpportunityShare os:lstOpportunityShare)
{

os.OpportunityAccessLevel = 'Read';
//os.RowCause = 'Manual';
updateOpportunityShare.add(os);

}
}
}

if(updateOpportunityShare.Size()>0)
{
update updateOpportunityShare;
}

}

 

Error-

"Apex trigger UpdateOpportunityOwner caused an unexpected exception, contact your administrator: UpdateOpportunityOwner: execution of AfterUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id 00tO0000006dLwcIAE; first error: FIELD_INTEGRITY_EXCEPTION, field integrity exception: RowCause (cannot update sharing row with this cause): [RowCause]: Trigger.UpdateOpportunityOwner: line 27, column 1".

 

when I am using RowCause than it giving field is not wrietabale 

Please help me out ...

Thanks in Advance 

I want to use the standard SFDDC functionality to disable a portal user.

 

To do this, I need a confirmation token as parameter in my URL.

 

How do I acquire this token?

  • January 30, 2012
  • Like
  • 0

Hi Friends,

 

While Installing the force.com IDE i am getting an error that is JVM terminated nd also some information will be displaying.

 

Please help me how to install the IDE..

  • November 25, 2011
  • Like
  • 0

Can we delete apex class from Production environment?

 

i know we can disable but looking to delete them

  • March 31, 2011
  • Like
  • 0

Hi,

 

We have some apex classes that have been deployed 3 years back without test classes.

Our production organization Now has exactly 75% code coverage( when i ran ALL APEX TEST Classes).

 

I have created a new trigger which needs to be deployed to the production. When trying to deploy the trigger and Its test class via Force.com IDE, it raises a error saying overall code coverage is 73%.

 

Now i want to deactivate/delete those apex classes that do not have test classes written.I do not know that why they have written and they are no longer used.

How can i accomplish this task of deactivating/deleting..

I tried searching the posts, but could not get a definitive way to accomplish this.

 

Any help or idea on this is highly appreciated.

 

Thanks,

Sales4ce