• Sandesh D Ganjare
  • NEWBIE
  • 44 Points
  • Member since 2015

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 23
    Questions
  • 15
    Replies
Hi, 
I have a decision_matrix__c table with following fields.
Age_of_Vehicle__c,
Max_Term__c,
Vehicle_Type__c by using Age_of_Vehicle__c and Vehicle_Type__c the Max_Term__c will be calculated automatically.
ie. Vechicle_Type='Bike', Age_of_Vehicle__c>=4 then Max_Term__c should be less than 5years.

And, I have another table named 'Vehicle_Application'.
In the 'Vehicle_Application' have fields called - Type_Of_Vehicle and Age_of_vehicle. By given these two values, I need to validate the Term__c field data fetch from 'decision_matrix__c -> Max_Term__c'.
ie. Age_of_vehicle = 3 and Vechicle_Type='bike' and Term__c should be less than which is given in the 'decision_matrix__c -> Max_Term__c'.
(Matrix Search)
Is there any idea?
Thanks.

Need Trigger to validation.
Hi All,

I am not able to access the Salesforce documentation anymore, I am facing this since the GDPR came into the picture. I am allowing to store the cookies but still not able to access the documentation. Please help!
Error-Imge
Thanks,
Sandesh
Hi,

 I want to use this app. But when I am trying to install this application into my sandbox I am getting following error,

 MDFDataIterator: Entity is not api accessible entity name: MetricsDataFile
MDFDataIteratorTest: Entity is not api accessible entity name: MetricsDataFile
MDFDataManager: Invalid type: MDFQueryDAOImpl
MDFDataManagerTest: Dependent class is invalid and needs recompilation: MDFDataManager: line 32, column 18: Invalid type: MDFQueryDAOImpl

Thanks in advance!

Regards,
Sandesh
Hello,

I'm developing the appexchange app and I want to track 'Google Analytics' for my visualforce pages in app. As the domain URL will be changed dynamically according to the instance, domain name, etc of installed org. Can anybody guide me How can I implement this?

Regards,
Sandesh Ganjare
 
Hello,
In our salesforce appexchange product we  are using indexedDB for storing the data locally. When I opened the application in Salesforce1 app v12.1 it does not allow to open indexedDB. It throws error "SecurityError(DOM Exception 18) : IDBFactory.open() called in invalid security context". I am using iPhone device with ios version 10.3.
The app is working fine on android device.

Thanks in advance
Sandesh Ganjare
I am generating the dynamic query in salesforce using the field selected on the vf page. 
e.g. 1 Id = 'GHDkmdfjnsdf21'
        2 name != 'Test'
        3 city = 'pune'
Now i have text box where user can enter his/her logic like 1 AND 2 AND 3 || 1 OR 2 OR 3 so if there is combination of AND/ OR like 
1 AND 2 OR 3 then the SOQL query will be wrong correct logic is 1 AND (2 OR 3). so I want to validate this logic.

Thanks in advance. 
Hi,
My requirement is that whenever the Custom report Type is created I want to do DML operation on Custom object. That will store the information related to that Custom report Type.

Thanks,
Sandesh
Hi,
I am new salesforce. I wrote fro fetching the reports for reports schema and displaying on the VF page. I have Wrote method where  supplying report Id from where I get List of Ids present in the reports.
So can you help to write the test class for the same.

Apex Code:
/////////////////////////////////////////////////////
/*List<Report> lstReport = [Select id,name from Report where format = 'Tabular'];
List<Id> lstID = new List<Id>();
List<String> lstname = new List<String>();
if(lstReport != null)
{
  for(Report rpt : lstReport)
  {*/
    Id reportId ='00O28000004otCPEAY';// rpt.id;//rpt.id; //;
    //System.debug(rpt.name);    
    Reports.ReportResults  reportDescription = Reports.ReportManager.runReport(reportId,true);
    Reports.ReportFactWithDetails factWithDetails = (Reports.ReportFactWithDetails)reportDescription.getFactMap().get('T!T');
    Reports.ReportExtendedMetadata reportExtendedMetadata = reportDescription.getReportExtendedMetadata();
    //Reports.ReportMetadata reportMetadata = reportDescription.getReportMetadata();
    System.debug(reportExtendedMetadata.getDetailColumnInfo());
    Map<String,Reports.DetailColumn> reportDetailColumn = reportExtendedMetadata.getDetailColumnInfo();
    List<Integer> indexList = new List<Integer>();
    List<List<Integer>> indexListofList = new List<List<Integer>>();  
    Set<ID> setRecordIds = new Set<ID>();
    List<String> lstobjectAPIName = new List<String>();
    List<MapPointInfo> lstMapPointInfo = new List<MapPointInfo>();
    Integer idColumnindex = 0;
    for(Reports.DetailColumn columnValue : reportDetailColumn.values())
    {
      Reports.ColumnDataType columnDataType = columnValue.getDataType();
      Reports.ColumnDataType typeData = Reports.ColumnDataType.ID_DATA;
      if(columnDataType == (Reports.ColumnDataType.ID_DATA))
      {
       String Name =columnValue.getName();
       String Label= columnValue.getLabel();
       indexList.add(idColumnindex);
       System.debug(Name);
       System.debug(columnDataType);  
      }
      idColumnindex = idColumnindex + 1;
    }
    System.debug(indexList);
////////////////////////////////////////////////////    
    if(indexList != Null)
    {  
     for(reports.ReportDetailRow  row :  factWithDetails.getRows())
     {    
     for (Integer i = 0; i < indexList.size(); i++) 
     {
       Integer m = indexList[i];
       if((row.getDataCells()[m].getLabel())!= '-' && (row.getDataCells()[m].getLabel())!=null)
       {
          setRecordIds.add(row.getDataCells()[m].getLabel());   
       }
     } 
     }  
    System.debug(setRecordIds);
    System.debug(setRecordIds.size());    
   }

Thanks,
Sandesh G

 
Hi,
I am new salesforce. I wrote fro fetching the reports for reports schema and displaying on the VF page. I have Wrote method where  i am supplying report Id from where I get List of Ids present in the reports.
So can you help to write the test class for the same.

Apex Code:
/////////////////////////////////////////////////////
/*List<Report> lstReport = [Select id,name from Report where format = 'Tabular'];
List<Id> lstID = new List<Id>();
List<String> lstname = new List<String>();
if(lstReport != null)
{
  for(Report rpt : lstReport)
  {*/
    Id reportId ='00O28000004otCPEAY';// rpt.id;//rpt.id; //;
    //System.debug(rpt.name);    
    Reports.ReportResults  reportDescription = Reports.ReportManager.runReport(reportId,true);
    Reports.ReportFactWithDetails factWithDetails = (Reports.ReportFactWithDetails)reportDescription.getFactMap().get('T!T');
    Reports.ReportExtendedMetadata reportExtendedMetadata = reportDescription.getReportExtendedMetadata();
    //Reports.ReportMetadata reportMetadata = reportDescription.getReportMetadata();
    System.debug(reportExtendedMetadata.getDetailColumnInfo());
    Map<String,Reports.DetailColumn> reportDetailColumn = reportExtendedMetadata.getDetailColumnInfo();
    List<Integer> indexList = new List<Integer>();
    List<List<Integer>> indexListofList = new List<List<Integer>>();  
    Set<ID> setRecordIds = new Set<ID>();
    List<String> lstobjectAPIName = new List<String>();
    List<MapPointInfo> lstMapPointInfo = new List<MapPointInfo>();
    Integer idColumnindex = 0;
    for(Reports.DetailColumn columnValue : reportDetailColumn.values())
    {
      Reports.ColumnDataType columnDataType = columnValue.getDataType();
      Reports.ColumnDataType typeData = Reports.ColumnDataType.ID_DATA;
      if(columnDataType == (Reports.ColumnDataType.ID_DATA))
      {
       String Name =columnValue.getName();
       String Label= columnValue.getLabel();
       indexList.add(idColumnindex);
       System.debug(Name);
       System.debug(columnDataType);  
      }
      idColumnindex = idColumnindex + 1;
    }
    System.debug(indexList);
////////////////////////////////////////////////////    
    if(indexList != Null)
    {  
     for(reports.ReportDetailRow  row :  factWithDetails.getRows())
     {    
     for (Integer i = 0; i < indexList.size(); i++) 
     {
       Integer m = indexList[i];
       if((row.getDataCells()[m].getLabel())!= '-' && (row.getDataCells()[m].getLabel())!=null)
       {
          setRecordIds.add(row.getDataCells()[m].getLabel());   
       }
     } 
     }  
    System.debug(setRecordIds);
    System.debug(setRecordIds.size());    
   }

Thanks,
Sandesh G

 
Hi, I want to filter the standard objects based on the trigger is possible or not on that object. In the salesforce org there are mnay standard objects but i want only those standard objects on whcih i can write the trigger.
can you help me!
thanks in advice,
Sandesh
Hi, I want to fetch the remote site setting present in my org through apex. It is possible or not, I dont know. If it is not possible please suggest the altenative solution. 

thanks,
Sandesh
Hi,
I am new to salesforce. I have an apex class from where I am calling a web service. I want to insert the delay of 10 sec so that I can handle the 'over query limit' error. 
thanks in advance!
I am using Google Map API for geocoding . I am getting "OVER_QUERY_LIMIT" error before the 2500 which is the Quota limit of google Map API key.I am sending 10 records in batch for geocoding. I think I am exceeding the per sec limit of google API. And after some time key is working correctly. 
Please Suggest Possible solution to handle this error.

Thanks in advance!
Hi,
I want to send the email to multiple conatcts after finishing the execution part in Batch APex. 
Thanks
 
hi,
I have master detail look up field "Employee name" and i want to fill this field through the trigger by taking the employye name from the logged in user. so, before savimg the record it takes the name from the logged user name and assign to the "Employee name "  field.

heLIP ME :-)

THANKS
 hi,
I have Employee Name field which having master ralationship with standard contact object. I want to display that Employee Name field automatically based on the name of logged in user name in visualforce page.  

help me...!
regards,
sandesh
I have custom field emp id in contact, the object leave appliction has master detail relationship on contact. i want to take emp id from contact and dump there in master-detail field of leave application "Employee ID"

Apex Controller :
public class myControllerExtension {
      
    public myControllerExtension(ApexPages.StandardController stdController) {
        //this.acct = (New_Application__c)stdController.getRecord();

    }
public decimal getEmpId() {
                User u = [select FirstName, Lastname from User where Id = :UserInfo.getUserId()];
                contact c = [select id, Employee_ID__c, Name from contact where (FirstName = :u.FirstName AND Lastname = :u.Lastname)];
                // return c.Employee_ID__c;
              return c.Employee_ID__c;
    }    
}

VF page :-
<apex:page standardController="New_Application__c" extensions="myControllerExtension">
 
   <apex:form >
   
        <apex:pageBlock title="Leave Application Details">
          <apex:pageBlockSection columns="1">               
              <apex:outputText label="Employee  Name  "> {!$User.FirstName} {!$User.LastName}</apex:outputText>
                       <apex:inputField value="{! New_Application__c.Employee_ID__c}" >{!EmpId}  </apex:inputField>
                       <apex:inputField value="{! New_Application__c.Subject__c}" />
               <apex:inputField value="{! New_Application__c.Application_Type__c}" />  
               <apex:inputField value="{!New_Application__c.Start_Date__c}" />
               <apex:inputField value="{!New_Application__c.End_Date__c}" />
               <apex:inputField value="{!New_Application__c.Reporting_PM__c}" />
            </apex:pageBlockSection>
             <CENTER>
            <apex:commandButton action="{!Save}" value="Save" />
            <apex:commandButton dir="LTR" action="{!cancel}" value="Cancel" /> 
            </CENTER>
        </apex:pageBlock>
        
    </apex:form>
</apex:page>
public class myControllerExtension {
           
    public myControllerExtension(ApexPages.StandardController stdController) {
        //this.acct = (New_Application__c)stdController.getRecord();
        User u = [select FirstName, Lastname from User where Id = :UserInfo.getUserId()];
    }
public String getEmployee_ID() {
        contact c = [select Employee_ID__c from contact where (FirstName = :u.FirstName AND Lastname = :u.Lastname)]
        return 'hello' + c.Employee_ID__c; //here is problem
    }  
    
}
hi,
If u have taken leave on certain date and then again applied on the same date then your application will not be submitted.
how I will do that one.
please Help.
Hello,
In our salesforce appexchange product we  are using indexedDB for storing the data locally. When I opened the application in Salesforce1 app v12.1 it does not allow to open indexedDB. It throws error "SecurityError(DOM Exception 18) : IDBFactory.open() called in invalid security context". I am using iPhone device with ios version 10.3.
The app is working fine on android device.

Thanks in advance
Sandesh Ganjare

Hi,

I have a senario where i need to display phone field on vf page when Leadsource in contact is equal to "other" .I am perfect with page and controller and functionality is working gd .But when comming to test class it is not covering boolean variable . i,e the below highlited line is not covering ...

Can anyone please check it out ?

controller class :

public class ActionFunctionExample {
    public Contact  con{get;set;}
    public Boolean phone{get;set;}
    public ActionFunctionExample() {
        con=new Contact (); 
    }
    public pagereference clickandchange() {
        if(con.LeadSource=='Other') {
           phone=true; 
        }
        else{
            phone= false;
        }
        return null;
    }
}.

Test class :

@istest
public class ActionFunctiontest_TC {
    public static testmethod void testForActiofunction() {
        contact mycon = new contact();
        mycon.LastName='raghu';
        mycon.LeadSource = 'Other';
        mycon.HomePhone= '2483742';
        insert mycon ; 
        ActionFunctionExample ac = new ActionFunctionExample();
        ac.clickandchange();
        
    }
}

I have Two List of object records.
List<Account> accList1 = {1st record, 2nd record, 3rd record, 4th record};
List<Account> accList2 = {1st record, 3rd record};
 
I have another List<Account> accList3 = new List<Account>()
now I want to compare both List list1 and list2, get the record from list1 which is not present in list2 and add to List3.
 
Hi All,
I have created one user from the system admin user and when I logged with the created user credential its showing no items on the home page of the salesforce.  Please see the attached screenshot. 

Can you please let me know if there is anything specific I
need to give while creating from the system admin user?

Home page
 
Hi,

I am beginner in Salesforce and learning SOQL and SOSL right now. In a problem staement, I want to compare month of LastModifiedDate with the month of current date but unable to do. Can anyone please help?
Hi, 
I have a decision_matrix__c table with following fields.
Age_of_Vehicle__c,
Max_Term__c,
Vehicle_Type__c by using Age_of_Vehicle__c and Vehicle_Type__c the Max_Term__c will be calculated automatically.
ie. Vechicle_Type='Bike', Age_of_Vehicle__c>=4 then Max_Term__c should be less than 5years.

And, I have another table named 'Vehicle_Application'.
In the 'Vehicle_Application' have fields called - Type_Of_Vehicle and Age_of_vehicle. By given these two values, I need to validate the Term__c field data fetch from 'decision_matrix__c -> Max_Term__c'.
ie. Age_of_vehicle = 3 and Vechicle_Type='bike' and Term__c should be less than which is given in the 'decision_matrix__c -> Max_Term__c'.
(Matrix Search)
Is there any idea?
Thanks.

Need Trigger to validation.
Hi,

I have a text datatype field which contains numbers and an operator(-) When I try to get this field value in javascript, I am getting the substarcted value.

For ex: the original value is 341302-01. When I try to get this value in javascript, I am geeting 341301 where the auto substarct happened like 2-01, so it returns 1. Please let me know if you know the way to get the original value in jaavscript as it is available in DB including -.

Appreciate your help.
Hi,

 I want to use this app. But when I am trying to install this application into my sandbox I am getting following error,

 MDFDataIterator: Entity is not api accessible entity name: MetricsDataFile
MDFDataIteratorTest: Entity is not api accessible entity name: MetricsDataFile
MDFDataManager: Invalid type: MDFQueryDAOImpl
MDFDataManagerTest: Dependent class is invalid and needs recompilation: MDFDataManager: line 32, column 18: Invalid type: MDFQueryDAOImpl

Thanks in advance!

Regards,
Sandesh
Hi,
I want to send the email to multiple conatcts after finishing the execution part in Batch APex. 
Thanks
 
hi,
I have master detail look up field "Employee name" and i want to fill this field through the trigger by taking the employye name from the logged in user. so, before savimg the record it takes the name from the logged user name and assign to the "Employee name "  field.

heLIP ME :-)

THANKS
Hi ,

I am not able to login to Salesforce pardot with Salesforce credentails.
It alwasy gives me invalid username or password.My credentials works for Salesforce login.Please help me resolve this issue.

Thanks,
Madhuri

trigger HandleProductPriceChange on Merchandies__c (after update) { List<Line_Item__c> openLineItems =[SELECT j.Unit_Price__c, j.Merchandise__r.Price__c FROM Line_Item__c j WHERE j.Invoice_Statement__r.Status__c = 'Negotiating' AND j.Merchandise__r.id IN :Trigger.new FOR UPDATE]; for (Line_Item__c li: openLineItems) { if ( li.Merchandise__r.Price__c < li.Unit_Price__c ){ li.Unit_Price__c = li.Merchandise__r.Price__c; } } update openLineItems; }

I am Write folloeing test Class but code coverage is not 100%:-
@isTest public class TestProductPriceChange { Static TestMethod void TestPrice(){ Merchandies__c mer = new Merchandies__c(); mer.Name= 'Pept'; mer.Description__c = 'Scooty of 125 cc'; mer.Price__c = 600; mer.Total_Inventory__c = 100; insert mer;Invoice_Statement__c invoice = new Invoice_Statement__c(); invoice.Status__c = 'Negotiating'; invoice.Description__c = 'pept'; insert invoice; Line_Item__c line = new Line_Item__c( Name = '1', Unit_Price__c = 700, Merchandise__c = mer.id, Invoice_Statement__c = invoice.Id); insert line; }}
I have created One report and by mistake deleted and want create again so that i can complete chalange but i am unable to do beacuse it saying API is already Present.Please let me know how to create again
  • July 23, 2015
  • Like
  • 0

Hi All,

 

I have my salesfoce instance integrated with a third party application. This TPA sends some lead records to Salesforce and then it is created in salesforce. Now when they sent a record they get the following error.

 

System.Exception: user does not have access to use approval assignment email template

 

Does anyone know how this error occurs and how to solve it?

 

Regards

Rony

I get error message after installing my manage package.... when I tried to insert a record to the Custom Object from public site which use authenticated licenses it gives me...

Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_OR_READONLY, user does not have access to use approval assignment email template: 


I ve search a little and Iam sure that: 

*I ve cloned the profile (Authenticated)

*Related object  is available for Customer portal so I gave the Modify All permission for cloned profile

*Also I have checked the sharing model and the related object has public read/write

*Related controller does not include "with sharing " keyword.

 

Any solution for this ??? 

Meantime this functionality works without any problem in package org and also all the conditions same...Problem is the org where I ve downloaded the package.