• Data Migration 5
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 5
    Replies
I'm looking for sample logic for button to create an new opportunity from customer/account. When the user clicks on button on customer/account, screen should provide options to choose record type and then show page layout for opportunity with defaulted customer/account lookup and owner to be defaulted as customer record owner. How can we accomplish this with simple logic?
 
I have a custom field that stores complete file name. Is there any way to extract the file extension (like .ppt,.pdf etc) and populate the extension in another custom field?
I often need to update a custom field on Case based on the case number. I do not have case id. I was looking for a solution to update the custom field on case just by using case number and data loader. As Case Number is an auto number, I'm not able to make it external to be used as key in data loader.

Note: I want to avoid using VLOOKUP to get the case ID based on the case number. As this is an frequent activity, I'm looking for easy solution to updatecustom field.
We all know that Salesforce doesnt have out of the box button to move from current record to next/previous record with in a list view?

What is the best solution to accomplish to overcome this problem? Any sample codes for creating buttons to move onto next/previous record will be appreciated.
I have written a trigger (after update) on Opportunity. There are existing triggers on opportunity that fireup on opportunity update. To avoid infinite loop, I have used static variable in my trigger to avoid triggering twice. Now, while writing the test class, I have created new opportunity. But when I try to update that opportunity to make the trigger fire, my code in trigger is not getting executed as static variable has already been set to true. How to make my trigger fire now?
I have a custom lookup field from Opportunity onto contact object. For this lookup, we have a filter that only allows contacts that are cretaed under the same account as opportunity. When the user tries to populate this field from opportunity standard page layout, it is only showing up recently visited contacts. Is the contact is not browsed for long time, it doesnt showup for the user to select it. How to overcome this issue?
Hi, I need to create a custom buton (Detail Page Button/OnClick Java script) on opportunity page. When user clicks on custom button, all the opportunity records which have parent has current opportunity has to be submitted for approval. (I have cretaed a custom opportunity lookup field parent_opportunity__c on opportunity object). I have developed below java script to submit multiple child records to approval process. I see that only last record in the loop is getting submitted and the rest of the records are not submitted for approval process. what is missing here? What fix is required in below code.
{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/24.0/apex.js")} 

var result3 = sforce.connection.query("Select id,name From Opportunity o WHERE o.Parent_Opportunity__c = '{!Opportunity.Id}'");

var newOpp3 = result3.getArray("records");

for (var i=0; i<newOpp3.length; i++) {
  var temp = newOpp3[i];
  var opptyId = temp.Id;
  window.location.href = "/p/process/Submit?retURL=/" + opptyId + "&id=" +      
  opptyId;
  alert(temp.Name + " -- "  + temp.Id + opptyId );
  }

 
Hi, As we all develop apex code in different sandboxes and finally need to move to QA sandbox/any other sandbox. What are the best tools available for code comparison (my current sandbox version against prod/any other sandbox version) before moving code from one sandbox to another to  understand the changes we did? What are the best practices for code comparison? Any ideas on this will be highly appreciated.
I often need to update a custom field on Case based on the case number. I do not have case id. I was looking for a solution to update the custom field on case just by using case number and data loader. As Case Number is an auto number, I'm not able to make it external to be used as key in data loader.

Note: I want to avoid using VLOOKUP to get the case ID based on the case number. As this is an frequent activity, I'm looking for easy solution to updatecustom field.
Hi,

Is it possible to do mass Approval / Reject in Approval process in standard functionality

Advance Thanks
Siv
  • October 29, 2015
  • Like
  • 0
Hi, I need to create a custom buton (Detail Page Button/OnClick Java script) on opportunity page. When user clicks on custom button, all the opportunity records which have parent has current opportunity has to be submitted for approval. (I have cretaed a custom opportunity lookup field parent_opportunity__c on opportunity object). I have developed below java script to submit multiple child records to approval process. I see that only last record in the loop is getting submitted and the rest of the records are not submitted for approval process. what is missing here? What fix is required in below code.
{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/24.0/apex.js")} 

var result3 = sforce.connection.query("Select id,name From Opportunity o WHERE o.Parent_Opportunity__c = '{!Opportunity.Id}'");

var newOpp3 = result3.getArray("records");

for (var i=0; i<newOpp3.length; i++) {
  var temp = newOpp3[i];
  var opptyId = temp.Id;
  window.location.href = "/p/process/Submit?retURL=/" + opptyId + "&id=" +      
  opptyId;
  alert(temp.Name + " -- "  + temp.Id + opptyId );
  }