• Shalini R
  • NEWBIE
  • 30 Points
  • Member since 2016

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 4
    Questions
  • 19
    Replies
Hello,

Please find the code below and guide me.
public class Task17 {
    public Map<String, schema.SObjectType> allObjects {get;set;}
    public List<SelectOption>	objNames	{get; set;}
    public String objName {get; set;}
    public String selectedName	{get; set;}
	
    public Task17(){
        list<selectoption> objNames = new List<selectoption>();
        allObjects = schema.getGlobalDescribe();
        list<string> allNames = new list<string>(allObjects.keySet());
        //allNames.sort();
        system.debug('line 19'+allNames);
            for( String key1 : allNames){
                objNames.add(new SelectOption(key1,key1));
            }
        system.debug('Line22'+objNames);
        
    }    
}

VF page is below.
<apex:page controller="Task17" >
    <apex:form>
    	<apex:pageBlock>            
        	Please Select the obj
            <apex:selectList value="{!selectedName}">
            	<apex:selectOptions value="{!objNames}"/>
            </apex:selectList>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Pick list is not displaying.  Help..
 

Hi All,

Actually, I tried to reuse the content in the Difference VF page. For that created new VF components. When added the Vf component in the VF page working fine. But when i tried to show the content which is coming from the Component at the bottom of the Vf page, can be showing error like 'PDF generation failed. Check the page markup is valid.'.

Please refer the below code and let me share your thoughts.

VF page code:

<apex:page renderAs="pdf" sidebar="false" showHeader="false" applyHtmlTag="false" applyBodyTag="false">
 <head>
    <style type="text/css" media="print">
      @page {                                 
        @top-left {
          content: element(header)
        }
        @bottom-left {
          content: element(footer);
        }
        margin:45mm 5mm 55mm 5mm;
        size:portrait;
        font-family: sans-serif;
     }                        
    div.header {
         padding-bottom: 50px;
         position: running(header);
    }  
    div.footer {
         display: block;
         padding: 10px;
         position: running(footer);
    }               
    </style>    
    </head>
 <div class="header">
  <c:Component1 ></c:Component1 >
 </div>
 
 <div class="footer">
  <c:Component2></c:Component2>  
 </div>
 
 <div>
 Test kjlkdfl
 </div>
 </apex:page>

Component1 code :

<apex:component > Test Header </apex:component>

Component2 code :

<apex:component > Test Footer </apex:component>

 

Thanks

Shalini R

 

Hi,

I created one visualforce page as pdf template. I added object field values and attachment links on this template. When i click on this attachment link, the attachment need to show on new tab. But now it will show on same page. Please share me if you know the solution.

Attachment Linking Code 

<apex:outputLink  value="{!URLFOR($Action.Attachment.Download,samplelink)}" >Click to show taachment</a>

Thanks,
Shalini R
Hi, 

I got the above error when i send sms to above 50 phone numbers. i have query some records then calling future callout method.
Please share your comments if you face this type of issue.
 
Hi All,
I created one DatePicker field on visualforce page using Jquery. Then i added these visualforce page on Account layout. DatePicker does not showing full image on pagelayout. But if i increased Visualforce page Width and height, it will display full datepicker image. Without increase Vf properties how to achieve this ?
I tried it by using z-index but does not showing full datepicker image. Kindly share your comments if you know the answer.

Code  -
<style>
#datepicker{
    z-index: 9999;
    position: absolute;
     display: inline-block; 
  }
</style>
<script>
 $('#datepicker').datepicker();
</script>
Date<input id="datepicker" type="text"/>

DatePicker image showing on PageLayout

User-added image


Thanks.
I am using a workflow to trigger an email alert. The main recepient contains actual email addresses and in the additional 5 email space contains email address realted to sms services. See the screenshot below.
User-added image

This functionality was working till last week. Now that the emails in the additional field is not working as SMS is not reaching the cell phone. The email in the recepient field is working perfectly fine.
Also i have checked sending mail to xxxxxxx888.vtext.com via my outlook ,and the SMS reached the phone. SMS is not generated only when it is sent via salesforce. Please see my deliveribility settings below:

User-added image

Also i have generated Email Logs:
User-added image

Please guide me to findout the problem.
 
Hi All 
Can any one help me with this 
i am working on a project
where i have one login page and home page , in home page i have button name payment  if the user is login then only he can go to payment section or not he has to go to login page .


 
Hello,

Please find the code below and guide me.
public class Task17 {
    public Map<String, schema.SObjectType> allObjects {get;set;}
    public List<SelectOption>	objNames	{get; set;}
    public String objName {get; set;}
    public String selectedName	{get; set;}
	
    public Task17(){
        list<selectoption> objNames = new List<selectoption>();
        allObjects = schema.getGlobalDescribe();
        list<string> allNames = new list<string>(allObjects.keySet());
        //allNames.sort();
        system.debug('line 19'+allNames);
            for( String key1 : allNames){
                objNames.add(new SelectOption(key1,key1));
            }
        system.debug('Line22'+objNames);
        
    }    
}

VF page is below.
<apex:page controller="Task17" >
    <apex:form>
    	<apex:pageBlock>            
        	Please Select the obj
            <apex:selectList value="{!selectedName}">
            	<apex:selectOptions value="{!objNames}"/>
            </apex:selectList>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Pick list is not displaying.  Help..
 
Hello All,
  I have trigger that create no of contacts realted to account as per value entered in No_Of_Contact in account object.
Trigger:
trigger AllAccountTrigger on Account (after insert,after update, before insert, before update) {
    if(Trigger.isAfter)
    {   if(Trigger.isInsert || Trigger.isUpdate)
        { 
          AccountExample.createMultipleContact(Trigger.new);
        }
    }
    }

class method:
 public static void createMultipleContact(List<Account> acc){
         List<Contact> c= new List<Contact>();
         for( Account a:acc){
          if(a.Create_Contact__c= true && a.No_Of_Contacts_to_create__c!= 0){
          for(Integer i=1; i<=a.No_Of_Contacts_to_create__c;i++){
          Contact con=new Contact();
          con.FirstName=a.name;
          con.LastName =a.Account_Number__c+'-'+con.Contact_Count__c;
          con.Phone=a.phone;
          con.AccountId=a.Id;
          c.add(con); 
            }
            if(c.size()>0){
            insert c;
               }
              }
             }
            }
 
 but i getting error: System.FinalException: Record is read-only:
We have 3 Javascript buttons which change the record type and reassigns the case to a queue. Here is an example 

{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")} 

var caseObj = new sforce.SObject("Case"); 
caseObj.Id = '{!Case.Id}'; 
caseObj.RecordTypeId = '012400000009FQA';
caseObj.OwnerId = '00G40000001dp2s'

var result = sforce.connection.update([caseObj]);

if (result[0].success =='false') {
alert (result[0].errors.message);
} else {
location.reload(true);
}

I am looking for detailed step-by-step instructions/tutorial to convert this to Lightning Component. 

Thank you in advance. 
Hi,

I created one visualforce page as pdf template. I added object field values and attachment links on this template. When i click on this attachment link, the attachment need to show on new tab. But now it will show on same page. Please share me if you know the solution.

Attachment Linking Code 

<apex:outputLink  value="{!URLFOR($Action.Attachment.Download,samplelink)}" >Click to show taachment</a>

Thanks,
Shalini R
Hi, 

I got the above error when i send sms to above 50 phone numbers. i have query some records then calling future callout method.
Please share your comments if you face this type of issue.
 
Just need some help with creating a formula, I am not sure whether it is possible but I imagine it is.

On the account object. I want to calculate the total spend between a set date (controlled by another field) and the current date. So as I change this set date you can see how much a particular company has spent since then.

I know you will need the opportunity fields to relate to but could anyone create a formula which I can work from or just any advice in general would be appreciated.

I have created a Attachment Manager type setup, and the only thing is I am not able to pass the ID of the attachment to a new window.  It opens with nothing in it.

 

Any idea how I could fix this maybe?

 

   <apex:actionStatus id="status" startText="Searching... please wait..."/>
      <apex:pageBlockSection title="Search Results" id="resultsBlock" columns="1">
        <apex:pageBlockTable value="{!searchResults}" var="item" rendered="{!NOT(ISNULL(searchResults))}">
        <apex:column headerValue="Delete">
            <apex:commandLink action="{!deleteAttachment}" onclick="if(!confirm('Are you sure?')) return false;">Del
                <apex:param value="{!item.id}" name="idToDel" assignTo="{!AttachId}"/>
            </apex:commandLink>
            </apex:column>
            <apex:column value="{!item.id}" HeaderValue="Attachment ID" width="100"/>
          <apex:column headerValue="Name of Attachment   (Click to view)" >
            <apex:outputLink value="{!URLFOR($Action.Attachment.Download,item.id)}" target="_blank">
            View</apex:outputLink>
            </apex:column>

 The code displays the list, as well as the option to Delete it, (and it works) however when I click on the View, it opens a new window but nothing is pulled over to view.  ?? Any idea?

I am using an outputText tag along with a param tag to format a date file.  This works quite well in the sprin'09 release.  I get compile errors in Summer '09.  Here is a simple page that works in spring'09 but gets an error on save in the summer '09 release.

<apex:page >
  <h1>Congratulations</h1>
  This is your new Page
            <apex:outputText value="{0,date, MMMM d', 'yyyy}">
                <apex:param value="{!NOW()}" />
            </apex:outputText>

</apex:page>

 

The error message I get in summer '09 is below.  Does anyone have any idea how to get around this?  I have opened a case on this - the number is 02709898

 

 

Error: The value attribute on <apex:outputText> is not in a valid format. It must be a positive number, and of type Number, Date, Time, or Choice.

 

 

 

 

Error 

 

Message Edited by dchasman on 06-08-2009 01:00 PM
Best Practice : When someone takes the time/effort to repspond to your question, you should take the time/effort to either mark the question as "Solved", or post a Follow-Up with addtional information.

User-added image


      That way people with a similar question can find the Solution without having to re-post the same question again and again. And the people who reply to your post know that the issue has been resolved and they can stop working on it. 

Thanks #Copy_Steve Molis