• Sujit Anil Nirkhe
  • NEWBIE
  • 0 Points
  • Member since 2016
  • Associate Consultant
  • Wipro Technologies


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 12
    Replies
Say for example I've 2 objects x & y, and they dont have any relationship. Now my task is when a perticular field of x object get insert/update/deleted then it must insert/update/deleted from y object.
How to achieve this functionality?
Hi, 

I want to cover the json parsing in test class. how to do this.. based on the json response i am calling another method. So problem here is, am unable to cover the json parsing.

below is my screen shot.

User-added image
During any DML operation if a job gets failed, how can I trace the failed fields or get the log?
Hi,

can any one help me, How to display chart based on the selection of from date and to date using visualforce page.

Thanks,
 
Hey guys,
I've searched but haven't seen this exact scenario, so perhaps I'm wording it wrong, but here goes on the explanation, in hopes to get some guidance. 

Scenario, in point form:
  • I have a custom object = Sessions
  • I need to relate Sessions to the standard object, Accounts, using the Account Name
  • I have two fields on Sessions to accomplish = Account Name (lookup to the Account standard object), and = Account Name Submitted
  • Sessions entries are submitted via webform, so I am using a custom field to capture the Account name = Account Name Submitted
  • The idea is that the Account Name Submitted is what the user submits, and what I want to do is have a trigger or process that looks up the Account Name Submitted, determine if there is a match to an Account Name in the system, and if so, update the Account Name lookup field on the custom Sessions object to created the association
Any guidance is appreciated - do I have to write code/trigger for this? can I use Process Builder or Flows? Other options? I thought this might be a common scenario, but perhaps I'm not searching using the correct salesforce vocabulary.

Thanks for any guidance!
hi,

I am using iframe to show youtube embedded video on visualforce page. I want to capture if the video is played or not.
Please help me to write onclick function or any other way to capture the click on video.

Thanks
we have lead record with name,phone num,email id and lead source. now if we create one more lead record with same name, phone num, email id but with different lead source, how to update the old lead source value with new lead source value using trigger retaining all the other information?
Hi
I have rest resource thru which I want to create multiple account and for each account I want to create multiple contacts.
Its working for single accout and multiple contacts.
Pls help me in understanding how to create multiple accounts and how to frame the json query for multiple account.
 
@RestResource(urlMapping='/BulkInsertaccountcontact/*')
global class Bulkinsert_accountcontact
{
   global class RequestBody 
   {
       Account a; //create single account
       List<Contact> cList;
   }
   
   global class myWrapper
   {
      List<Account> a;
      List<Contact> cList;
      public string status;
      public string message;
   }
   
   @HttpPost
   global static myWrapper doPost(RequestBody rb)
   {
      RestRequest req=RestContext.request;
      RestResponse res=RestContext.response;
   
      myWrapper response=new myWrapper(); //this is object of wrapper class
      
      List<Account> myList=new List<Account>();
      
      try
      {
        myList.add(rb.a);
        
        Insert myList;
        response.a=myList;
                
        for(Contact con:rb.cList)
        {
           con.AccountID=rb.a.ID;
        }
        
        //we need to insert contact List also
        Insert rb.cList;
        response.cList=rb.cList;
        response.status='Success';
        response.message='Created Successfully';
        
      }
      catch(exception ex)
      {
         response.a=null;
         response.cList=null;
         response.status='ERROR';
         response.Message='could not create record'+ ex.getMessage();
      }
      
      return response;
   }
}

workbench:
==========

{
   "rb":{

      "a":{

         "Name":"LG1",

         "SLAExpirationDate__c":"2016-4-21",

         "Active__c":"Yes",

         "SLA__c":"Platinum",

         "SLASerialNumber__c":"200"

      },

      "cList":[

         {

            "FirstName":"K1",

            "LastName":"K2"

         },

         {

            "FirstName":"K3",

            "LastName":"K4"

         }

      ]
      }
             
}