• lali
  • NEWBIE
  • 5 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 5
    Replies
I have a webservice called RetrieveAccountInfo defined as follows:
webservice static String RetrieveAccountInfo (List<String> AccIdsList){........}

when creating the WSDL, I get it as follows:
<xsd:elment name="AccIdsList " minOccurs="0" maxOccurs="unbounded" type="xsd:string" nillable="true"/>

I want  to define the maxOccurs to a certain number? How do I do that?

I know that there is no limit on the number of items a collection can hold.
but for security reasons , I  want to define the list size and accordingly the maxOccurs size changes.

Any suggestions...


thanks in advance ...

 
  • May 08, 2017
  • Like
  • 0
Hi,
Can we do the lookup relationship to the report object ? When trying to create a lookup field in a custom object , why is that I don't see the report object in the dropdown . I want to save the reportid int he custom object.

if this is not possible, is it that we create a text field on the object and save the reportid to that by showing a select option on the page which will show the reports and then grab that reportid and store in the custom object. ( this is the other way that I am thinking. just want to make sure this is right)

Thanks
lali
  • March 13, 2015
  • Like
  • 0
HI All,
how to get the Soql query of a report in a batch class so that I can have it in the Database.QueryLocator Start method?

please any help...

Thanks
lalitha
  • March 12, 2015
  • Like
  • 0
Hi All,
Had the following simple code like it is shown in the Example in salesforce but gives a compilation error saying 'Initial term of field expression must be a concrete SObject: List<Report>'

List <Report> reportList = [SELECT Id,DeveloperName FROM Report where 
DeveloperName = 'BSC_Accounts'];
String RID = (String)reportList.get(0).get('Id');
        
// Run the report
Reports.ReportResults results = Reports.ReportManager.runReport(RID, true);
System.debug('Synchronous results: ' + results);

running the same code in 'Execute Anonymous Window' works just fine.

Need Help...

Thank you :)



// Get the report ID

 List <Report> reportList = [SELECT Id,DeveloperName FROM Report where 

            DeveloperName = 'BSC_Accounts'];

 String RID = (String)reportList.get(0).get('Id');

        

 // Run the report

 Reports.ReportResults results = Reports.ReportManager.runReport(RID, true);

System.debug('Synchronous results: ' + results); 
  • March 09, 2015
  • Like
  • 0
Hi,
I created expense tracker app in my orgnization just like it is given in the Lightning component Developer Guide.
When I ran the application I was able to see all the Expenses from the Expense object - as expected.
Enter  a new expense and cliking on the submit button doesn't create an expense record. - reason found after debugging is 
the action.setCallback(this, callback) is not being executed  

if I comment the action.setcallback  in getexpenses and then try to execute the  action.setCallback(this, callback) in create expense then it works.

So what I understodd finally is that only calling the serverside call once worked but the second time it doesn't do anything.
Is there something in my org that I need to enable to get the full version of the lightning  to work?

Thanks in advance. 
  • February 24, 2015
  • Like
  • 0
Hi,
I created the expense tracker app in one rganization and trying to move to a different org . 

deploying  failed with the error:
Missing feature, Details: Installing this package requires the following feature and its associated permissions: Lightning Component Bundles

 My changeset includes the follwoing objects : 
User-added image

Thanks
 
  • February 24, 2015
  • Like
  • 0
Hi,
 I have a blank page with an action method that performs some database inserts and finally after that I need to close this window.
 
following is my code.my page has only the following code:

<apex:page action="{!generatePDF}"  controller="VFC_ER_GeneratePDF"  showheader="false"  standardStylesheets="false" >
</apex:page>

In the controller 'VFC_ER_GeneratePDF' I have a method called generatePDF with the following code.  and finally after that I want to close this window. How do I do that pls help...

public class VFC_ER_GeneratePDF {
    public string  sigID;
    public string ERID;
    
    public VFC_ER_GeneratePDF() {
        
        sigID = System.currentPageReference().getParameters().get('sigID'); 
        ERID = System.currentPageReference().getParameters().get('id'); 

    }
    
      public pageReference  generatePDF() {
      
      PageReference pdf = New PageReference ('/apex/'+ 'vf_SignatureCaptured');
        // add parent id to the parameters for standardcontroller
        pdf.getParameters().put('id',ERID);
        pdf.getParameters().put('sigID',sigID);
      
        // create the new attachment
        Attachment attach = new Attachment();
     
        // the contents of the attachment from the pdf
        Blob body;
     
        try {
                // returns the output of the page as a PDF
                body = pdf.getContentAsPDF();
            }
          catch (VisualforceException e) 
            {
                // need to pass unit test -- current bug  
                body = Blob.valueOf('Some Text');
            }
     
        attach.Body = body;
        attach.Name = ERId + '.pdf';
        attach.IsPrivate = false;
        attach.ParentId = ERId;
        insert attach;
        system.debug('Final Attachement' + attach);
          
        //delete the signature attachment 
          List<Attachment> attachedFiles = [select Id from Attachment where id =:sigID limit 1];
        if( attachedFiles != null && attachedFiles.size() > 0 ) 
        {
           delete attachedFiles;
        }  
        
        //this is where I need to close this window.
      
      }      
  
}
 
  • November 11, 2014
  • Like
  • 0
Hi, I have a button with the folllowing code which will open a window and after closing that window, I want to perform some action based on the return value of that window. Can anyone pls help on how to acheive that ?

{!requireScript("/soap/ajax/28.0/connection.js")} 
{!requireScript("/soap/ajax/28.0/apex.js")} 

var childWin;

if ('{!Equipment_Request__c.Equipment_Type2__c }' == 'CSP-CM')
{
  window.open('/apex/VF_TechnicalSurvey_Signature_Capture?Id={!Equipment_Request__c.Id}');

}

//after closing the window that was opened above, I want to perform the following code

var contract = new sforce.SObject("Equipment_Request__c");
var retStr;
var pageName = "vf_SignatureCaptured";

retStr = sforce.apex.execute("SE_ER_Coffee_PDF", "savePdf", {
ERId : '{!Equipment_Request__c.Id}',
pageName : pageName
});
  • November 10, 2014
  • Like
  • 1
I have  a method that can get the picklist values of a given feild. But for a dependent picklist feild, I want to get the controlling feild value and its corresponding picklist values . Can some one help on how to do this...

this is code that gets the value of the picklist feilds

global static List<String> getPicklistValues(String ObjectApi_name,String Field_name){

      List<String> lstPickvals=new List<String>();
      Schema.SObjectType targetType = Schema.getGlobalDescribe().get(ObjectApi_name);//From the Object Api name retrieving the SObject
      Sobject Object_name = targetType.newSObject();
      Schema.sObjectType sobject_type = Object_name.getSObjectType(); //grab the sobject that was passed
      Schema.DescribeSObjectResult sobject_describe = sobject_type.getDescribe(); //describe the sobject
      Map<String, Schema.SObjectField> field_map = sobject_describe.fields.getMap(); //get a map of fields for the passed sobject
      List<Schema.PicklistEntry> pick_list_values = field_map.get(Field_name).getDescribe().getPickListValues(); //grab the list of picklist values for the passed field on the sobject
    
      for (Schema.PicklistEntry a : pick_list_values) { //for all values in the picklist list
          lstPickvals.add(a.getValue());//add the value  to our final list
      }
      return lstPickvals;
    }

Thanks
Lalitha 
  • September 17, 2014
  • Like
  • 0
Hi, I have a button with the folllowing code which will open a window and after closing that window, I want to perform some action based on the return value of that window. Can anyone pls help on how to acheive that ?

{!requireScript("/soap/ajax/28.0/connection.js")} 
{!requireScript("/soap/ajax/28.0/apex.js")} 

var childWin;

if ('{!Equipment_Request__c.Equipment_Type2__c }' == 'CSP-CM')
{
  window.open('/apex/VF_TechnicalSurvey_Signature_Capture?Id={!Equipment_Request__c.Id}');

}

//after closing the window that was opened above, I want to perform the following code

var contract = new sforce.SObject("Equipment_Request__c");
var retStr;
var pageName = "vf_SignatureCaptured";

retStr = sforce.apex.execute("SE_ER_Coffee_PDF", "savePdf", {
ERId : '{!Equipment_Request__c.Id}',
pageName : pageName
});
  • November 10, 2014
  • Like
  • 1
HI All,
how to get the Soql query of a report in a batch class so that I can have it in the Database.QueryLocator Start method?

please any help...

Thanks
lalitha
  • March 12, 2015
  • Like
  • 0
Hi All,
Had the following simple code like it is shown in the Example in salesforce but gives a compilation error saying 'Initial term of field expression must be a concrete SObject: List<Report>'

List <Report> reportList = [SELECT Id,DeveloperName FROM Report where 
DeveloperName = 'BSC_Accounts'];
String RID = (String)reportList.get(0).get('Id');
        
// Run the report
Reports.ReportResults results = Reports.ReportManager.runReport(RID, true);
System.debug('Synchronous results: ' + results);

running the same code in 'Execute Anonymous Window' works just fine.

Need Help...

Thank you :)



// Get the report ID

 List <Report> reportList = [SELECT Id,DeveloperName FROM Report where 

            DeveloperName = 'BSC_Accounts'];

 String RID = (String)reportList.get(0).get('Id');

        

 // Run the report

 Reports.ReportResults results = Reports.ReportManager.runReport(RID, true);

System.debug('Synchronous results: ' + results); 
  • March 09, 2015
  • Like
  • 0