• Priyanka Pallepati
  • NEWBIE
  • 30 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 24
    Replies
Hi,

I have a look up field on visual force page. Need a look up to user. So querying contact by logged in user and making use of contact.reportsId as the value of input field. This is bringing up the look up field to user and wanted the input field before the glass icon to be disabled. so I did this way. 
  • <apex:inputField id="requestor" value="{!contact.ReportsToId}"  html-disabled="true">
I also have a button besides the input field as below 
  • <apex:commandButton value="Submit" action="{!doSave}"/>
so whenever a user picks up a user by the glass icon and clicks on submit, I want the text of value sent to my controller in doSave method.
For example: if I pick Priyanka Pallepati as the user by clicking the glass icon of look up field, I want to send Priyanka Pallepati to my doSave method.

How do I achieve this? Any suggestions would be highly appreciated.

Regards,
Priyanka.
Hi I have a scheduler class which implements Schedulable and in the execute method I am executing a batch using 
SynchronizerBatch batch = new SynchronizerBatch(UserInfo.getSessionId(),query);
Database.executeBatch(batch,1);

How do I schedule this scheduler class every 30 minutes in salesforce?
Hi - 

Here is my scenario.. I have logged into community using an partner community user 1 and in my vf page I am getting partner community user 2 by its id and getting the related contact to it...
Even though the partner community user 2 has a contact in SF, when I query for it, the rows returned are zero. 

Is it some security that needs to be enabled for partnery community user 1 profile(the one which I am logging into community)?
Hi - 

I have a after update trigger, based on the update of few values of a object, I sent the object to a queuable object.
This queuable object in turn makes sure it sets up the queue and using the execute method sends each object to a webservice.
How do I make sure the execute method of queuable object operated correctly?

Thanks.
Priyanka.
Hi all - 

I have a SOAP webservice request of this sort:

               <emailAddresses xsi:type="bpc:ArrayOfEmailAddressStructure" soapenc:arrayType="bpc:EmailAddressStructure[]"/>

This is an array of type EmailAddressStructure and I have the similar object (EmailAddressStructure) defined in my project. I will be getting the values of this object from UI..

how do I send an array of EmailAddressStructure to this SOAP sample request?
 
Hi all - 

Using Apex, did you ever had to subtract the business days from any given date? 
Like for ex: if I have to subtract from today 11/19/2014-10 days, it should exclude all the weekends and give me the final date 11/5/2014.
Please let me know if you have any function related to this requirement.
Thanks for looking into this.

Regards,
Priyanka
Hi -

I am quite new to jquery..I just need some jquery table(which has search functionality across all the rows and sort functionality)
Can anyone point me to a good article which guides me step by step to achieve this?

Thanks,
Priyanka
Hello all -

I created a test opportunity: 

   Opportunity Opp = new Opportunity();
    Opp.Name = 'Test Opportiunity ';
    Opp.AccountId = acct.id;
    Opp.Business_Line__c = 'Capital Markets';
    Opp.Result_Reason__c = 'Amenities';
    Opp.CloseDate = System.today();
    Opp.StageName = 'Qualified';
    Opp.LeadSource = 'Web';
    Opp.Type = 'New Customer - New Business';
    Opp.Product_Type_Interests__c = 'ActiveDisclosure';
    insert Opp;

After this I'm doing a System.assert('true,Opp.Id==null). The test class passes with this assert? I'm not sure why? The opportunity should have a ID I believe even within the test class.

Following to this code, I'm setting the id as a page parameter as below:

PageReference myVfPage = Page.AssociateECP;
    Test.setCurrentPage(myVfPage);
    ApexPages.StandardController sc = new ApexPages.StandardController(Opp);
    AssociateECPController ac = new AssociateECPController(sc);

   
    // Put Id into the current page Parameters
    ApexPages.currentPage().getParameters().put('id',Opp.Id);
    String id = ApexPages.currentPage().getParameters().get('id');
    system.assert(true,id==null); --> Again I want to set the id as the Opp.Id so that I can cover the code in my original class

Please let me know what steps I'm missing. Thank you
Hello all- 

I have a scenario where the three objects trigger have relatively same logic for beforeInsert and beforeUpdate. Even the fields of these objects that i use in trigger are same. this is my below code. i want to use sobject so that i dont mention the object name Bill_To__c in the below code. Instead I use sobject so that my other two objects Sold_To__c and Running_Account__c can use the same trigger.  Can anyone help?

public static void relateWCSSToAccount(Lis<Bill_To__c> wcssList,Map<Id,Bill_To__c> oldMap)  {
        List<String> guids = new List<String>();
        Map<String,Id> accountMap = new Map<String,Id>(); 
        for(Bill_To__c wcss:wcssList)
          {
           // In case of Update, Add GUID when trigger old map GUID is not equal to trigger new list GUID.
           if(oldMap!=null && oldMap.size()>0)
           {
            if(wcss.GUID__c!=(oldMap.get(wcss.Id).GUID__c))
              guids.add(wcss.GUID__c);
           }
           // Incase of insert; get the new GUIDs
           if(wcss.GUID__c!=null)
           {
            guids.add(wcss.GUID__c);
           }
          }
         
          if(guids.size()>0)
          {
            //Find matching accounts based on GUID
           for(Account a : [SELECT Id,GUID__c FROM Account WHERE GUID__c in:guids])
           {
            accountMap.put(a.GUID__c,a.Id);
           }
          }
          if(accountMap!=null && accountMap.keyset().size()>0)
          {
           // Iterate through Trigger.New list of WCSS
           for(WCSS_Bill_To__c wcssNew : wcssList)
           {
            if(wcssNew.GUID__c!=null)
            {
             if(accountMap.get(wcssNew.GUID__c)!=null)
              {
               // Update Account on each WCSS_Bill_To_c object.
                wcssNew.Account__c = accountMap.get(wcssNew.GUID__c);
              }
            }
           }
          }
       }
Hello all -

I am trying to merge two accounts. Both the accounts, I am using a describe call to get all the fields. In my scenario I am checking if the master account has blank values in any of the fields, I am filling it with the losing account values. However when I merge (Database.merge(masteraccount,loseraccount), I get this error:

salesforce MERGE_FAILED, Invalid field IsPartner for merge: []

I checked few forums, but hardly got anything online.

Can anyone throw some light?

Regards,
Priyanka.
Hi,

I have a look up field on visual force page. Need a look up to user. So querying contact by logged in user and making use of contact.reportsId as the value of input field. This is bringing up the look up field to user and wanted the input field before the glass icon to be disabled. so I did this way. 
  • <apex:inputField id="requestor" value="{!contact.ReportsToId}"  html-disabled="true">
I also have a button besides the input field as below 
  • <apex:commandButton value="Submit" action="{!doSave}"/>
so whenever a user picks up a user by the glass icon and clicks on submit, I want the text of value sent to my controller in doSave method.
For example: if I pick Priyanka Pallepati as the user by clicking the glass icon of look up field, I want to send Priyanka Pallepati to my doSave method.

How do I achieve this? Any suggestions would be highly appreciated.

Regards,
Priyanka.
Hi - 

I have a after update trigger, based on the update of few values of a object, I sent the object to a queuable object.
This queuable object in turn makes sure it sets up the queue and using the execute method sends each object to a webservice.
How do I make sure the execute method of queuable object operated correctly?

Thanks.
Priyanka.
Hi all - 

Using Apex, did you ever had to subtract the business days from any given date? 
Like for ex: if I have to subtract from today 11/19/2014-10 days, it should exclude all the weekends and give me the final date 11/5/2014.
Please let me know if you have any function related to this requirement.
Thanks for looking into this.

Regards,
Priyanka
Hello all -

I created a test opportunity: 

   Opportunity Opp = new Opportunity();
    Opp.Name = 'Test Opportiunity ';
    Opp.AccountId = acct.id;
    Opp.Business_Line__c = 'Capital Markets';
    Opp.Result_Reason__c = 'Amenities';
    Opp.CloseDate = System.today();
    Opp.StageName = 'Qualified';
    Opp.LeadSource = 'Web';
    Opp.Type = 'New Customer - New Business';
    Opp.Product_Type_Interests__c = 'ActiveDisclosure';
    insert Opp;

After this I'm doing a System.assert('true,Opp.Id==null). The test class passes with this assert? I'm not sure why? The opportunity should have a ID I believe even within the test class.

Following to this code, I'm setting the id as a page parameter as below:

PageReference myVfPage = Page.AssociateECP;
    Test.setCurrentPage(myVfPage);
    ApexPages.StandardController sc = new ApexPages.StandardController(Opp);
    AssociateECPController ac = new AssociateECPController(sc);

   
    // Put Id into the current page Parameters
    ApexPages.currentPage().getParameters().put('id',Opp.Id);
    String id = ApexPages.currentPage().getParameters().get('id');
    system.assert(true,id==null); --> Again I want to set the id as the Opp.Id so that I can cover the code in my original class

Please let me know what steps I'm missing. Thank you
Hello all -

I am trying to merge two accounts. Both the accounts, I am using a describe call to get all the fields. In my scenario I am checking if the master account has blank values in any of the fields, I am filling it with the losing account values. However when I merge (Database.merge(masteraccount,loseraccount), I get this error:

salesforce MERGE_FAILED, Invalid field IsPartner for merge: []

I checked few forums, but hardly got anything online.

Can anyone throw some light?

Regards,
Priyanka.