• atidev
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 7
    Replies

Hi,

  I have a list containing products and the pricebook values for the product.

For a given product, value doesn't exist in every pricebook. I need to filter the initial list so that I show only the products that have all the pricelists values to the user.

public List<ProductInfo> products {get; set;}

 products = new List<productInfo >();
  Map<Id, productInfo> pInfoMap = new Map<Id, productInfo>();
  for (PricebookEntry pEntry :[Select id, unitPrice, product2Id, product2.Name, product2.Description, product2.Family, pricebook2id, pricebook2.name from PricebookEntry order by product2.Name LIMIT 300 ])  {
           
                ProductInfo pInfo = new ProductInfo();
                if(!pInfoMap.containsKey(pEntry.product2Id)) {
                    pInfo.prod = new Product2(id=pEntry.product2Id, Name=pEntry.product2.Name, Description=pEntry.product2.Description,);
                    pInfo.pbelist.add(pEntry);  
                    pInfoMap.put(pEntry.product2Id, pInfo);                   
                } else {
                    pInfo = pInfoMap.get(pEntry.product2Id);
                    pInfo.pbelist.add(pEntry);
                }
            }

....Similarly I do for each price book name.

 products = pInfoMap.values();

 

I need to filter this products table so that I only show the products which have prices in all pricebooks.

  • March 22, 2012
  • Like
  • 0

Hi,

  I was wondering if there is any tool that could be used to do automated testing of the Salesforce modules. ie, I could use to the tool to test the functionality befre moving the changes/features to the production env.

Regards.

  • October 20, 2011
  • Like
  • 0

Hi,

  Is there a way where we can find the query that is used to generate a Salesforce report. ?

Thanks.

  • September 30, 2011
  • Like
  • 0

Hi,

  I have this query which I am running from .NET using Salesforce web service . I get the error that sObject type 'OpportunityLineItem' is not supported. I checked the WSDL and the opbject name does exist in that. 

SELECT Opportunity.Owner.Name, Opportunity.Territory.Name, Opportunity.Account.Market__c, Opportunity.Name, Opportunity.ID, OOpportunity.Account.Name, Opportunity.Probability,  totalprice,  FROM OpportunityLineItem.

Wondering if anyone has faced the issue.

Thanks,

  • September 23, 2011
  • Like
  • 0

Hi,

  I need to create a report that runs hourly and uploads the csv file generated to a linux machine.

Thanks.

  • September 19, 2011
  • Like
  • 0

Hi,

  I need to generate a report which shows the total number of activites (Both open and closed) for each leads.  

 

I also need to show the last activity date. There is a last activity date in Lead, and that is showing the due date of the last activity date. 

 

 

  • April 13, 2011
  • Like
  • 0

Hi,

  I have to create custom fields to show the Last activity date and Number of activities for a lead in the lead detail section.

How can I do that? Is it possible to show this information in Lead?

Thanks and looking forward for an answer.

  • April 11, 2011
  • Like
  • 0

Hi,

  How can i add validation to avoid duplicates in Product. In my scenario, duplicates ahould not exist for the same product code and region combination. ie, Product code and region combination values should be unique.

Thanks.

  • April 11, 2011
  • Like
  • 0

Hi,

  I have to create custom fields to show the Last activity date and Number of activities for a lead in the lead detail section.

How can I do that? Is it possible to show this information in Lead?

Thanks and looking forward for an answer.

 

  • April 11, 2011
  • Like
  • 0

  I am following this lik to http://wiki.developerforce.com/index.php/Force.com_for_ASP.NET_Developers create a web class that needs to be called from a Visual studio. I created the class getLeadInfo and when I go to AppSetup ->Develop->Apex Classes ->Click on the getLeadInfo .It opens the Class Detail and there is a Generate WSDL button. When I click on that it opens a page, but no WSDL document is shown. Has anyone seen the same problem?  What should be done to get the WSDL document?

 

  • March 16, 2011
  • Like
  • 0

Hello All,

 

I have a requirement to create a grid in Saleforce using jqGrid  and Json.   The jqGrid working example page http://www.trirand.com/blog/jqgrid/jqgrid.html has examples using MySQL and JSON.

 

Is there any examples using Salesforce along with JSON???

 

Any help will be greatly appreciated!!

 

Thanks

 

 

Hi,

  I have to create custom fields to show the Last activity date and Number of activities for a lead in the lead detail section.

How can I do that? Is it possible to show this information in Lead?

Thanks and looking forward for an answer.

  • April 11, 2011
  • Like
  • 0

Hi,

  I have to create custom fields to show the Last activity date and Number of activities for a lead in the lead detail section.

How can I do that? Is it possible to show this information in Lead?

Thanks and looking forward for an answer.

 

  • April 11, 2011
  • Like
  • 0
I am trying to automatically submit a record for approval in a visualforce page but hitting some problems.  I tried following the Apex Approval Processing example (http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_process_example.htm) but I get this error:

Code:
System.DmlException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval 
process found.

 
So I thought I needed to create a ProcessInstance but trying to insert this results in:

Code:
System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, 
Required fields are missing: [ProcessDefinitionId, CurrentNodeId]: [ProcessDefinitionId, CurrentNodeId]

 
I have set up an approval process for my custom object and it is active so that doesn't seem to be the problem.  This is a controller extension for my VF page and the 'record' variable is the object that has been passed into the page.  Here is my function that uses the submit for approval :

Code:
public void SubmitApproval()
    {
/* Attempting to set up a ProcessInstance
ProcessInstance approvalProcess = new ProcessInstance(); approvalProcess.TargetObjectId = record.Id; //approvalProcess.ProcessDefinitionId = ; approvalProcess.Status = 'Started'; //approvalProcess.CurrentNodeId = ; //insert approvalProcess;
*/

// Create an approval request
  Approval.ProcessSubmitRequest approvalRequest = new Approval.ProcessSubmitRequest(); approvalRequest.setComments('Testing Approval Submit'); approvalRequest.setObjectId(record.Id); Approval.ProcessResult approvalResult = Approval.process(approvalRequest); if (!approvalResult.isSuccess()) { ApexPages.Message error = new ApexPages.Message(ApexPages.Severity.ERROR, 'There was an error with the Submit For Approval Request.'); ApexPages.addMessage(error); } }

 
Edit:  Just a quick update.  If I submit the record for approval using the normal way I can then create a commandButton that approves the pending request.  This approval doesn't run into any problems at all.  I must be missing something from my Submit request.






Message Edited by XactiumBen on 06-24-2008 03:21 AM

Message Edited by XactiumBen on 06-24-2008 03:50 AM