-
ChatterFeed
-
1Best Answers
-
1Likes Received
-
0Likes Given
-
8Questions
-
7Replies
Visualforce Word Doc Rich Text Area Field Rendering Issues
I am having rendering issues when I create a word doc from a visualforce page containing a Rich Text Area field. The spaces after a period render as a  (capital A caret). It seems this is some type of text encoding translation error. Any idea how to fix this?
I have tried using put outputField and outputText with escape="false". It's a real annoyance to my users to have edit these out before they save the word doc.
-
- OSJMgr
- August 04, 2012
- Like
- 0
- Continue reading or reply
Unable to Select Visualforce Page When Creating Custom Button - Standardcontroller Included
This has been brought a hundred times before, but my problem must be unique. I cannot see any of my visualforce pages in the Content drop down when I want to create a detail page custom button. The page I am trying to select contains the standardcontroller of the SObject for which I am trying to create the button.
I can see my scontrols, but why can't I see my pages if they contain the correct standardcontroller? Note, this is for a simple detail page button, not a list button.
-
- OSJMgr
- June 20, 2012
- Like
- 0
- Continue reading or reply
Another Maximum View State Size Error - Please Help!
Hi All:
I receive the following error when I click on a commandbutton in a visualforce page that calls another page to execute Apex code:
Maximum view state size limit (128K) exceeded. Actual viewstate size for this page was 182.391K
The wierd thing is, is that it works fine in the Sandbox, but not in production.
There are a couple of other posts regarding this issue, however, they specifically address trying to attach a file via a visualforce page. I am not trying to do that. I just have a very large page that includes a tabpanel. On the conclusion tab, I include a list of child records with the ability to conduct inline editing using the apex:repeat tag and a controller that uses a SOQL statement to return the records.
Please Help!
Here is an excerpt of the code:
public class supissuesController {
// class variables
Inspection__c insp;
Supervisory_Issue__c[] supissue;
public String strID = 'unset';
public supissuesController() {
}
public supissuesController(ApexPages.StandardController controller) {
this.insp = (Inspection__c)controller.getSubject();
System.Debug('DEBUG: CALLING CONSTRUCTOR');
this.supissue = [ SELECT
SystemModstamp, Name,
LastModifiedDate, LastModifiedById, LastActivityDate,
IsDeleted, Id, CreatedDate, CreatedById,
Category__c, Type__c, Issue_Notes__c, Follow_up_Type__c,
Follow_up_Notes__c, Status__c, Resolution_Type__c,Resolution_Date__c ,Referred_to_FFS_Compliance__c,
Notes_to_Compliance__c
FROM
Supervisory_Issue__c
WHERE
Inspection__c = :insp.id
ORDER BY Category__c ASC];
}
// Action Method called from page button
public pagereference saveChanges() {
upsert this.supissue;
return null;
}
public PageReference getstrID() {
PageReference pageRef = ApexPages.CurrentPage();
pageRef.getParameters().put('strID', strID );
return pageRef ;
}
// Action Method called from page link
public pagereference newSupervisoryissue() {
Supervisory_Issue__c d = new Supervisory_Issue__c();
d.Inspection__c =this.insp.id;
supissue.add( d );
return null;
}
// public Getter to provide table headers
public string[] getheaders() { return new string []
{'Name', 'Category','Type', 'Issue Notes',
'Follow-up Type', 'Follow-up Notes', 'Issue Status','Resolution Type','Closed Date',
'Refer Compliance?','Compliance Notes' } ; }
// public Getter to list related supervisory issues
public Supervisory_Issue__c[] getSupervisoryissue() {
return this.supissue;
}
public pageReference CallInsertClass() {
String strPage = '/apex/CallInsertClass?';
ID InspID = System.currentPageReference().getParameters().get('id');
Inspection__c insp = [select RR_DM__c from Inspection__c where ID = :InspID LIMIT 1];
strPage += 'InspID=' + InspID;
strPage += '&ContID=' + insp.get('RR_DM__c');
Pagereference midPage = new Pagereference(strPage);
midPage.setredirect(true);
return midPage ;
}
public pageReference InvokeNewRcdCreator () {
Inspection__c[] Insp_recs= new List<Inspection__c>();
ID InspID = System.currentPageReference().getParameters().get('InspID');
ID ContID = System.currentPageReference().getParameters().get('ContID');
ID RRID;
String strSOQL;
Schema.DescribeFieldResult InspFld;
Integer FldCount = 1;
String strPage = '/apex/rrbydminsp?id='+InspID;
Schema.DescribeSObjectResult InspResult;
Map<String, Schema.SObjectField> InspMap = new Map<String, Schema.SObjectField>();
InspMap = Schema.SObjectType.Inspection__c.fields.getMap();
List<Schema.SObjectField> InspList = InspMap.values() ;
System.Debug('InspID: ' + InspID );
System.Debug('PAGEREF: ' + System.currentPageReference().getURL());
String strInsp_flds = '';
InspFld= InspList.get(0).getDescribe();
strInsp_flds = InspFld.getName(); /// build the first one....
for( Integer i = 1 ; i < InspList.size() ; i++ ){
InspFld= InspList.get(i).getDescribe();
strInsp_flds += ','+InspFld.getName();
FldCount++;
}
//DEBUG
//InspID = 'a0ES0000001BM6v';
strSOQL = 'SELECT ' + strInsp_flds + ' FROM Inspection__c WHERE Id=\''+InspID+'\' LIMIT 1';
System.debug('SOQL for Inspection__c : ' + strSOQL );
Insp_recs= Database.query(strSOQL );
RRID = Insp_recs[0].RR_DM__c;
Contact dummyCont =[select OwnerID from Contact where ID = :RRID LIMIT 1];
RRID = dummyCont.OwnerID;
Supervisory_Issue__c sup_issue ;
//
// START CREATING RECORDS
//
/// first: Create a Supervisory record and start working on it....
integer RcdsCreated = 0;
if (Insp_recs[0].RRDMUnrslvdDef__c == True) {
sup_issue = Init_SupRcd(InspID, ContID, RRID);
sup_issue.Issue_Notes__c = 'Issues from previous inspection' ;
sup_issue.Issue_Notes__c += ' were not resolved by current inspection. ';
sup_issue.Issue_Notes__c += ' Noted by DM during the RRs ';
sup_issue.Issue_Notes__c += Insp_recs[0].Inspection_Year__c;
sup_issue.Issue_Notes__c += ' inspection conducted on ';
sup_issue.Issue_Notes__c += Insp_recs[0].Inspection_Date__c;
sup_issue.Issue_Notes__c += '. See hardcopy inspection checklist ';
sup_issue.Issue_Notes__c += 'or contact the ROSJ for additional details. ';
sup_issue.Issue_Notes__c += 'Details: ' + Insp_recs[0].RRDMUnrslvdDefNotes__c;
if(Insp_recs[0].Inspection_Date__c != null) {
sup_issue.Event_Date__c = Insp_recs[0].Inspection_Date__c;
}
if(Insp_recs[0].Date_Reviewed__c != null) {
sup_issue.Date_Reported__c = Insp_recs[0].Date_Reviewed__c;
}
sup_issue.Category__c = 'Inspection';
sup_issue.Type__c = 'Unresolved Inspection Deficiencies';
sup_issue.How_Discovered__c = 'Office Inspection';
sup_issue.Discovered_By__c = 'District Manager';
sup_issue.Status__c = 'Closed';
sup_issue.Follow_up_Type__c = 'Other';
sup_issue.Resolution_Type__c = 'Other';
sup_issue.Resolution_Date__c = Date.today();
insert sup_issue;
RcdsCreated++;
} //repeats several times
///
/// -- Logical end of Controller -- now do cleanup
///Insp_recs[0].DebugCnt__c = RcdsCreated;
//return(RcdsCreated);
strPage = strPage + '&rcds=' + RcdsCreated;
Pagereference lastPage = new Pagereference(strPage);
///System.debug('REDIRECT page: ' + strPage);
lastPage.setredirect(true);
return lastPage ;
}
public Supervisory_Issue__c Init_SupRcd(ID InspID, ID ContID, ID RRID) {
Supervisory_Issue__c sup_issue = new Supervisory_Issue__c();
sup_issue.Inspection__c = InspID;
sup_issue.DM_RR__c = ContID ;
sup_issue.Assigned_To__c = RRID;
return sup_issue;
}
public integer BoolCheck(boolean bChkVal) {
integer retVal = 0;
if (bChkVal == True)
retVal = 1;
return retVal;
}
}
-
- OSJMgr
- March 16, 2010
- Like
- 0
- Continue reading or reply
Run an Scontrol using Hyperlink formula field
-
- OSJMgr
- November 16, 2006
- Like
- 0
- Continue reading or reply
Way to Pass Date Via Hyperlink Formula Field
- Year1 = Year({!Date__c})
- Month1 = Month({!Date__c})
- Day1 = Day({!Date__c})
2. Convert each of these fields to text by creating 3 more formula fields:
- Year2 = Text({!Year1__c})
- Month2 = Text({!Month1__c})
- Day2 = Text({!Day1__c})
3. Create 3 custom TEXT fields on the object that you will be passing the date to:
- Year1
- Month1
- Day1
4. Create 3 customer NUMBER formula fields to convert the text to numbers:
- Year2 = VALUE({!Year1__c})
- Month2 = VALUE({!Month1__c})
- Day2 = VALUE({!Day1__c})
5. Reassemble these three fields using a DATE formula field:
DATE(Year2, Month2, Day2)
Pass the Year2, Month2, Day2 fields on the first object to the Year1, Month1, Day1 fields on the second object through the normal Hyperlink function.
-
- OSJMgr
- November 13, 2006
- Like
- 0
- Continue reading or reply
Using Look-up field in Formula
-
- OSJMgr
- November 01, 2006
- Like
- 1
- Continue reading or reply
Need Help with Hyperlink Function
-
- OSJMgr
- October 16, 2006
- Like
- 0
- Continue reading or reply
Simple code to pass child record field to parent record field
-
- OSJMgr
- April 26, 2006
- Like
- 0
- Continue reading or reply
Using Look-up field in Formula
-
- OSJMgr
- November 01, 2006
- Like
- 1
- Continue reading or reply
Visualforce Word Doc Rich Text Area Field Rendering Issues
I am having rendering issues when I create a word doc from a visualforce page containing a Rich Text Area field. The spaces after a period render as a  (capital A caret). It seems this is some type of text encoding translation error. Any idea how to fix this?
I have tried using put outputField and outputText with escape="false". It's a real annoyance to my users to have edit these out before they save the word doc.
- OSJMgr
- August 04, 2012
- Like
- 0
- Continue reading or reply
Unable to Select Visualforce Page When Creating Custom Button - Standardcontroller Included
This has been brought a hundred times before, but my problem must be unique. I cannot see any of my visualforce pages in the Content drop down when I want to create a detail page custom button. The page I am trying to select contains the standardcontroller of the SObject for which I am trying to create the button.
I can see my scontrols, but why can't I see my pages if they contain the correct standardcontroller? Note, this is for a simple detail page button, not a list button.
- OSJMgr
- June 20, 2012
- Like
- 0
- Continue reading or reply
Calculate Total Expenditure
- KerryT
- September 19, 2006
- Like
- 0
- Continue reading or reply
Summating custom fields
Sales Order is one object, Sales Order Item is another, which has Sales Order as it's master.
I expected it to be a customer formula in Sales Order like this; {!LineItemAmount__c:SUM}
but this won't even validate.
{!LineItemAmount__c} validates OK - it is in the custom fields drop down but it comes out as 0 when it's applied, even though there are Sales Order Items, each with total prices, so I'm guess it is not the right one to use anyway.
The Sales Order Item has a custom field available for the amount I'm after, referenced like this
{!TotalPrice__c}
What I need to do is add up the {!TotalPrice__c} for all Sales Order Items in a particular Sales Order. Does that make sense - if so, can I do it?
Thanks in advance
Ben
- benh
- August 16, 2006
- Like
- 0
- Continue reading or reply
Custom Summary Formula Average Question
- JimmyC1228
- July 12, 2006
- Like
- 0
- Continue reading or reply