• path2cloud
  • NEWBIE
  • 50 Points
  • Member since 2012

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies

I try to access the Product-entity in a custom-made apex class method and get the following compile time error:

"Entity 'Product' not accessible in version 25.0"

 

Any thoughts? I'm currently developing a product selection screen & functionality and was hoping to be able to reuse the Product Entity itself.

Hi

        I have created 2 popup on 2 button. And have a object (AC). On both popup I have some fields to insert. 

 In 1st popup it contain A.name1, A.name2, A.date, A.Edate, A.Pjt etc and in 2nd popup I have fields A.Name1, A.name2. The A.Name1 and A.name2 are required field in object.

 

        My problem is that when I try to insert the value in the 1st popup I am getting error meg that "YOU MUST ENTER A VALUE" but even then i enter the value. So I commented the 2nd popup then it is working fine but when 2nd popup is uncommented the this error is thrown event the value is entered. The 2nd popup contains the same 2 fields in the first with some other fields.

 

can anybody help me to find the solution for this error.

 

<apex:outputPanel id="tstpopup">
        <apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displayPopUp}"/>
            <apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displayPopUp}">
            <apex:pageblock >
                <apex:pageblocksection >
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="name1: " />
                    <apex:inputfield id="proj" value="{!AC.name1__c}" />
                    </apex:pageblocksectionitem>
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="name2: " />
                    <apex:inputfield id="role" value="{!AC.name2__c}" />
                    </apex:pageblocksectionitem>
                    <p/>
                    <apex:commandbutton value="Pencil in a New Project" action="{!save}"   />
                    <apex:commandbutton value="Cancel" action="{!closePopup}" immediate="true" /><br/><br/><br/>
                    </apex:pageblocksection>
                    </apex:pageblock>
            </apex:outputPanel>
        </apex:outputPanel>
        
        
     <apex:outputPanel id="tstpopup1">
        <apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displayPopUp}"/>
            <apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displayPopUp}">
            <apex:pageblock >
                <apex:pageblocksection >
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="name1: " />
                    <apex:inputfield id="proj1" value="{!AC.name1__c}" />
                    </apex:pageblocksectionitem><p/>
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="Date: " />
                    <apex:inputfield id="sd" value="{!AC.Date__c}" />
                    </apex:pageblocksectionitem>
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="EDate: " />
                    <apex:inputfield id="ed" value="{!AC.EDate__c}" />
                    </apex:pageblocksectionitem>
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="Proj: " />
                    <apex:inputfield id="pl" value="{!AC.Pjt__c}" />
                    </apex:pageblocksectionitem>
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="Charge: " />
                    <apex:inputfield id="charge" value="{!AC.Charge__c}" />
                    </apex:pageblocksectionitem>
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="Name2: " />
                    <apex:inputfield id="role1" value="{!AC.name2__c}" />
                    </apex:pageblocksectionitem>
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="time: " />
                    <apex:inputfield id="overtime" value="{!AC.time__c}" />
                    </apex:pageblocksectionitem>                   
                    </apex:pageblocksection>
                    <apex:commandbutton value="Assign to a New Project" action="{!assign}"   />
                    <apex:commandbutton value="Cancel" action="{!closePopup}" immediate="true" /><br/><br/><br/>
                    </apex:pageblock>
            </apex:outputPanel>
        </apex:outputPanel>

 

 

 

controller class is as

 

public class demo
{
    public map<String,String>demoMap{get;set;}
    public List<String> demoList {
        get {return new List<String> {'1011','1111','1112','112'};}set;}

    public demo()
    {
        demoMap=new map<String,String>();
        demoList=new list<String>();
    }

    public boolean demoMethod()

    {
        demoMap=new map<String,String>();
        for(String s :demoList )
        {
            String key=s;
            String value='test';
            demoMap.put(key,value);
        }
        return true;
    }

}

 

 

visualforce page is as

 

<apex:page controller="demo"> 
<apex:panelGrid columns="4">
<apex:outputLabel value="{!demoMap[demoList[0]]}"/>
<apex:outputLabel value="{!demoMap[demoList[1]]}"/>
<apex:outputLabel value="{!demoMap[demoList[2]]}"/>
<apex:outputLabel value="{!demoMap[demoList[3]]}"/>
</apex:panelGrid>
</apex:page>

 

Hi,

 

I'm trying to create a table of contents in a visualforce page rendered as a pdf. Has anybody done this? Is this even possible?

 

I'm looking for something that would end up looking like:-

 

1. Lorem Ipsum......................1

2. Lorem Ipsum......................2

3. Lorem Ipsum......................2

4. Lorem Ipsum......................3 

 

(heading).............................(page number)

 

I know I can do the first bit but I don't have any way of knowing which page the heading will fall on due to differing content lengths.

 

Thanks for any help.

Rich.

I try to access the Product-entity in a custom-made apex class method and get the following compile time error:

"Entity 'Product' not accessible in version 25.0"

 

Any thoughts? I'm currently developing a product selection screen & functionality and was hoping to be able to reuse the Product Entity itself.

I have rendered a vf page as pdf. I am unable to change the fon-family to arial.

 

I have used

<style type=text/css>

p

{

font-family:"Arial Unicode MS";

font-size:14pt;

}

span

{

font-family:"Arial Unicode MS";

font-size:8pt;

}

h1

{

font-family:"Arial Unicode MS";

font-size:9pt;

}

</style>

<p>some text1</p>

<span>some text2</span>

<h1>some text3</h1>

--- - --  - - -- -  -

- - - - - - - --

But the problem here is am getting a new line everytime I use <p> and <h1> tag.

I dno't want this new line to occur.

Also I tried using <h2>,<h3>,.. , <pre>, <b> and

display:inline;

 

 

How to get the font family as arial without a new line. Also how to make the text bold?

I have tried <b> tag and

font-family:"Arial Unicode MS Bold";

 

Its not working.

 

 

Pls help.

Hi

        I have created 2 popup on 2 button. And have a object (AC). On both popup I have some fields to insert. 

 In 1st popup it contain A.name1, A.name2, A.date, A.Edate, A.Pjt etc and in 2nd popup I have fields A.Name1, A.name2. The A.Name1 and A.name2 are required field in object.

 

        My problem is that when I try to insert the value in the 1st popup I am getting error meg that "YOU MUST ENTER A VALUE" but even then i enter the value. So I commented the 2nd popup then it is working fine but when 2nd popup is uncommented the this error is thrown event the value is entered. The 2nd popup contains the same 2 fields in the first with some other fields.

 

can anybody help me to find the solution for this error.

 

<apex:outputPanel id="tstpopup">
        <apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displayPopUp}"/>
            <apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displayPopUp}">
            <apex:pageblock >
                <apex:pageblocksection >
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="name1: " />
                    <apex:inputfield id="proj" value="{!AC.name1__c}" />
                    </apex:pageblocksectionitem>
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="name2: " />
                    <apex:inputfield id="role" value="{!AC.name2__c}" />
                    </apex:pageblocksectionitem>
                    <p/>
                    <apex:commandbutton value="Pencil in a New Project" action="{!save}"   />
                    <apex:commandbutton value="Cancel" action="{!closePopup}" immediate="true" /><br/><br/><br/>
                    </apex:pageblocksection>
                    </apex:pageblock>
            </apex:outputPanel>
        </apex:outputPanel>
        
        
     <apex:outputPanel id="tstpopup1">
        <apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displayPopUp}"/>
            <apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displayPopUp}">
            <apex:pageblock >
                <apex:pageblocksection >
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="name1: " />
                    <apex:inputfield id="proj1" value="{!AC.name1__c}" />
                    </apex:pageblocksectionitem><p/>
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="Date: " />
                    <apex:inputfield id="sd" value="{!AC.Date__c}" />
                    </apex:pageblocksectionitem>
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="EDate: " />
                    <apex:inputfield id="ed" value="{!AC.EDate__c}" />
                    </apex:pageblocksectionitem>
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="Proj: " />
                    <apex:inputfield id="pl" value="{!AC.Pjt__c}" />
                    </apex:pageblocksectionitem>
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="Charge: " />
                    <apex:inputfield id="charge" value="{!AC.Charge__c}" />
                    </apex:pageblocksectionitem>
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="Name2: " />
                    <apex:inputfield id="role1" value="{!AC.name2__c}" />
                    </apex:pageblocksectionitem>
                    <apex:pageblocksectionitem >
                    <apex:outputlabel value="time: " />
                    <apex:inputfield id="overtime" value="{!AC.time__c}" />
                    </apex:pageblocksectionitem>                   
                    </apex:pageblocksection>
                    <apex:commandbutton value="Assign to a New Project" action="{!assign}"   />
                    <apex:commandbutton value="Cancel" action="{!closePopup}" immediate="true" /><br/><br/><br/>
                    </apex:pageblock>
            </apex:outputPanel>
        </apex:outputPanel>

 

 

 

Hello all. I'm creating a controller to send an email but the heap size is 6mb and the act of creating attachments has the effect of creating duplicates (however briefly) of the list of attachments, which would suggest that for a synchronous execution, you can at most have 3mb (total) of attachments. This seems impossibly restrictive. Does anyone have any ideas (other than asynchronous apex) to address this? The requirement is to produce a custom email send functionality in an image heavy org. Consequently, they want to be able to send the maximum size of attachments. The question becomes: does this deep copy behavior represent an absolute limit or is there a potential workaround?

I would appreciate any help anyone is able to give.

thank you.

 

code/debug results to illustrate the problem:

 

Messaging.SingleEmailMessage mail= new Messaging.SingleEmailMessage();

Messaging.EmailFileAttachment[] someAttach= newlist<Messaging.EmailFileAttachment>();

attachment a = [Select a.Name, a.ContentType,a.Body FromAttachment a limit 1];

Messaging.EmailFileAttachment attach=new Messaging.EmailFileAttachment();

attach.setFileName(a.Name);

attach.setInline(false);

attach.Body=a.body;

attach.setContentType(a.ContentType);

someAttach.add(attach);

a = null;

System.debug('Limit pre: '+Limits.getHeapSize()+' out of '+Limits.getLimitHeapSize()+'.\n ');

if(!someattach.isEmpty()) mail.setFileAttachments(someAttach);

System.debug('xxx Limit post: '+Limits.getHeapSize()+' out of '+Limits.getLimitHeapSize()+'.\n ');

 

the above code produces:

 

09:51:51.686 (3686665000)|USER_DEBUG|[79]|DEBUG|Limit pre: 16761 out of 6000000.

09:51:51.687 (3687050000)|USER_DEBUG|[81]|DEBUG|xxx Limit post: 32386 out of 6000000.

 

which would seem to be a deep copy of the entire list and consequently presents problems for the heap limit.