• community
  • NEWBIE
  • 49 Points
  • Member since 2007

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

I have 2 screens - Screen 1 and Screen 2.  I have a date field in the Screen 1.  I chose Today's date (using the standard date picker) and clicked Next.  Now I am in Screen 2.  I clicked Previous to get to Screen 1 and observed that the date now shown is the date field is Yesterday's!! 

 

Whatever Date I chose, if i click Next and come back to the screen, it is subtracting 1 day from it !! Is this a bug in the flows ? Or Am I doing anything wrong?

 

Please help

Hi All,

 

I am using addError method in a trigger to show some error messages.  I need to show the error message in two different lines, like below

 

***DO NOT ISSUE THIS ORDER***

***The order is currently with the DEV team***

 

I am unable to add the break between the lines. I tried the below:

 

AMet[0].addError('***DO NOT ISSUE THIS ORDER***'+BR()+'***The order is currently with the DEV team***');

 

But it says, there is no BR() method.

 

Help!!!

 

Thanks,

community

I have a field of type URL and it has a default value of some website URL in it. This field is read only.

 

When I click on New, I get the default value for the URL field in read only mode, but  I want this URL to be clickable !!

 

Can we make a read-only URL field clickable in Edit page? While giving the deault value, can we make it HYPERLINK there itself?

 

I am not using VF page. I want to do this in standard SF page.

 

Help!

 

Thanks

community

I have custom button of URL type where in I pass some field values, record type etc as shown below

 

https://xxx.salesforce.com/a1l/e?CF00N20000002oGtq={!ABC__c.Name}&CF00N20000002oGtq_lkid={!ABC__c.Id}&00N20000002o7Mi=Bus+Conversion&RecordType=01220000000AGAR

 

In this URL, can i make a field "Orders" hidden/invisible. I dont want Orders field to be displayed completely.  Is there any way can I do that in the URL. (like 00N20000002o7Mi:hidden or anything else)

 

Please let me know, if its possible or any other alternative.

 

P.S: I dont want to create a new record type and new page layout with no Orders field in it.

Created a new custom button of type URL and am passing values into it using merge fields.

 

Everything is fine but when the {!Opportunity.Name} contains "&", the URL breaks!

 

 

/setup/ui/recordtypeselect.jsp?ent=01I200000007SWS&retURL=%2F{!Opportunity.Id}&Name=Auto+Number&
save_new_url=%2Fa1l%2Fe%3FCF00N20000002o7Kh%3D{!Opportunity.Name}
%26CF00N20000002o7Kh_lkid%3D{!Opportunity.Id}%26retURL%3D%252F{!Opportunity.Id}&
CF00N20000002oGth={!Opportunity.Account}&CF00N20000002oGth_lkid={!Opportunity.AccountId}

 

 
 

How do I stop the URL break ,if the name contains '&' ?

 

Help!

 

Hi All,

 

I have a custom object (XYZ__c) under Opportunities as a related list (master-detail).

 

I had to pre-populate few fields in XYZ record when user clicks on 'NEW XYZ' button under the opportunity.

 

So, I used a custom button and replaced the standard NEW XYZ button in the page layout (of opportunity) passing values in the URL.

 

.........&Name=Auto+Number&RecordType=****************&saveURL=/{!XYZ__c.Id}&retURL=/{!XYZ__c.Id}

 

Everything is fine. But when users click on Save and New, these values are not prepolating, instead it re-directs user to record type selection page !!!!!!!! Becoz, after save its going to the standard NEW button in the XYZ object, which I haven't overriden.  I just replaced the new button in the pagelayout (of opportunity). 

 

I cannot over-write the standard NEW button of XYZ object with URL. I dont have any VF pages. I just need couple of fields to be pre-populated hence i am using URL to override. 

 

Any help would be highly appreciated!

 

Please help.

I rendering visualforce page as PDF. I am using data table to pull all the related lists into the VF page.

 

CRF__c is the main object. Address_Details__c is the child object (vlookup relation)

 

In a page block section called Address Details, there are 3 columns:

 

1) Address Type

2) Provide Post Code

3) Cease Post Code

 

If address type = Provide address, then only 1st and 2nd columns should be displayed.

If address type = Cease address, then only 1st and 3rd columns should be displayed.

 

For this, I am using output panel within the apex:columns. But its not working. If the condition satifies, the column header is missing in the output pdf.

 

 

<apex:pageBlock title="Address Details">
        <apex:dataTable value="{!CRF__c.Address_Details__r}" var="AD" columnsWidth="70px,70px" border="1" cellpadding="1">

<apex:column > <apex:facet name="header">Address Type:</apex:facet> <apex:outputText value="{!AD.Address_Type__c}"/> </apex:column> <apex:column> <apex:outputPanel rendered="{!AD.Address_Type__c=='Provide Address'}"> <apex:facet name="header" >Provide Post Code:</apex:facet> <apex:outputText value="{!AD.Provide_Post_Code__c}"/> </apex:outputPanel> </apex:column> <apex:column> <apex:outputPanel rendered="{!AD.Address_Type__c=='Cease Address'}"> <apex:facet name="header">Cease Post Code:</apex:facet> <apex:outputText value="{!AD.Cease_Post_Code__c}"/> </apex:outputPanel>
 </apex:column> </apex:dataTable> </apex:pageBlock>

 

Am i doing anything wrong. Please Help!!

 

 

Hi,

 

Im struggling with the actionSupport function in visualforce.

 

If the picklist value of 'Address_Type__c' is other than None , then the command button should be displayed.

 

Visualforce page:

<apex:page standardController="Address_Details__c" extensions="CRFNewAddressSelect">
<apex:form >

<apex:sectionHeader Title="Address Details" />
    <apex:pageBlock Title="Select the type of Address">
    
        <apex:pageBlockSection columns="1">
            <apex:PageBlockSectionItem >
                    <apex:outputLabel value="{!$ObjectType.Address_Details__c.fields.Address_Type__c.label}"/>
                    
                    <apex:selectList id="id_1" value="{!Address_Details__c.Address_Type__c}" size="1" >
                    <apex:actionSupport event="onchange" reRender="ajaxrequest" immediate="True"/>
                    <apex:selectOptions value="{!items}"/>
                     
                    </apex:selectList>

            </apex:PageBlockSectionItem>

            <apex:PageBlockSectionItem >
             
            <apex:outputPanel id="ajaxrequest" rendered="{!disp}">
                <apex:commandButton value="Continue"/>
            </apex:outputPanel>
            
            </apex:PageBlockSectionItem>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:form>
</apex:page>

 

 

Controller:

 

public with sharing class CRFNewAddressSelect {

private Address_Details__c AD;
    public CRFNewAddressSelect(ApexPages.StandardController stdcontroller) {
    this.AD=(Address_Details__c)stdController.getRecord();
    }

Boolean disp=False;

Public Boolean getdisp(){
return disp;
}
    
String Values;

public String getValues() {
            return Values;
        }
            
        public void setValues(String Values) {
            this.Values= Values;
            if(Values!=null)
            disp=True;
        }
public List<SelectOption> getItems() {
            List<SelectOption> options = new List<SelectOption>();
            options.add(new SelectOption('None','None'));
            options.add(new SelectOption('CA','Cease Address'));
            options.add(new SelectOption('CANADA','Canada'));
            options.add(new SelectOption('MEXICO','Mexico'));
            return options;
        }

}

 

I tried everything possible. Its not working.  For text fields my code does work, but for picklist, I think I am missing something. Help

 

 

 

I have 4 fields - Category1, Category2, Category3, Category4

 

I have created a formula field which concatenates all these into 1 single field and shows in the new field called TotalCategories

 

Total Categories = "Category1:" & Category_1__c & ";Category2:" & Category_2__c & ";Category3:" & Category_3__c & ";Category4" & Category_4__c

 

This is absolutely fine. But when only Category1 is filled.. Total Categories should show only Category1:"Category_1__c". Can anyone help .. how to do ? I tried using 'Case' but no use.

I have 2 custom objects. (Proj and Event). While creating a new Proj, I need to populate the proj name(mandatory field) with the Event name(lookup field) when the event name is filled.

 

I used workflow rule and field update to get this done but it isnt working.

 

This is what I used

 

Field to update : Project Name

Formula Value : Event_Name__c

 

Even i tried this, but in vain

 

Field to update : Project Name

Formula Value : Event_Name__r.Name

 

 Any ideas ?

 

 

I have 2 picklist fields(X and Y) from 2 different objects(One Custom object and the other Standard).

The picklist values for X are a;b;c

The picklist values for Y are 1;2;3

 

Now, if a user selects '1' as the picklist value in Y field, then the 'a' value in X should be deactivated.. i.e., the user should not be able to select 'a' value from X picklist. If the user wants to select 'a' then he can select a different value other than 1 from Y picklist.

 

How do I get this functionality done.. triggers ? or something else ? any idea.

 

 

Guys,

I have created a "NEW Page Layout" for Contact Object cloning it from an existing page layout. Removed "ABC Section" and added "New Section" in the "NEW Page Layout".I have created new fields in the NEW Section . Then I assigned this new page layout to a "NEW Profile". So when a user from this NEW Profile logs in, the user views the NEW Page Layout including the New Section. This is fine. Now,when the User(NEW Profile) clicks on EDIT button in the contact, the user views the "ABC Section" instead of the 'NEW Section', which is weird. The User must be able to edit the fields in New Section.

Can anyone help me fix this issue ??
If I select a report type category , say 'Accounts & Contacts' in the first step of report making (In the Report Wizard - while Creating a New Custom Report) , there are too many standard report types in the list , like Account History, Contact History, Contact with Assets etc which arent very useful to me. I want to hide/ delete those report types.Is it possible ??
 
Or can i create a separate 'Report Type Category' so that i can place all the custom report types which i feel are useful to me under the category ?

I have 2 screens - Screen 1 and Screen 2.  I have a date field in the Screen 1.  I chose Today's date (using the standard date picker) and clicked Next.  Now I am in Screen 2.  I clicked Previous to get to Screen 1 and observed that the date now shown is the date field is Yesterday's!! 

 

Whatever Date I chose, if i click Next and come back to the screen, it is subtracting 1 day from it !! Is this a bug in the flows ? Or Am I doing anything wrong?

 

Please help

Hi,

 

In my custom link I use &ReturnURL={!Opportunity.Link} for the return URL

 

How can I do it in a formula field?

 

{!Opportunity.Link} is not available, and do not want to include the instance name like:

 

https://cs8.salesforce.com/

 

I am looking for something dynamic that can be used in any instance?

 

Any ideas?

 

Thank you!

 

 

  • March 14, 2012
  • Like
  • 0

Hi All,

 

I am using addError method in a trigger to show some error messages.  I need to show the error message in two different lines, like below

 

***DO NOT ISSUE THIS ORDER***

***The order is currently with the DEV team***

 

I am unable to add the break between the lines. I tried the below:

 

AMet[0].addError('***DO NOT ISSUE THIS ORDER***'+BR()+'***The order is currently with the DEV team***');

 

But it says, there is no BR() method.

 

Help!!!

 

Thanks,

community

I have a field of type URL and it has a default value of some website URL in it. This field is read only.

 

When I click on New, I get the default value for the URL field in read only mode, but  I want this URL to be clickable !!

 

Can we make a read-only URL field clickable in Edit page? While giving the deault value, can we make it HYPERLINK there itself?

 

I am not using VF page. I want to do this in standard SF page.

 

Help!

 

Thanks

community

I just logged on and realized that Salesforce changed the Reports tab user interface in the last few days.  Instead of a nice set of folders that you can arrange any way you want, including hiding folders, the new UI lists all the folders on the left hand side of screen, Windows-Explorer-like and then you click on the folder to see the list of reports in the folder.  I could live with it, except I don't see how to hide certain folders from the folder list.  When I try to edit the folder, it does indeed indicate that the folder is hidden as I specified, yet it still shows up in the folder list and I can still run the reports that are in it?  Any suggestions?  This is an emergency, as all the extra folders will confuse the users to no end!  I want the old interface back!!!

 

It is rather annoying when Salesforce changes the user interface without telling the customers.  Sometimes the new interfaces are not as good as the ones they replaced.

  • October 11, 2011
  • Like
  • 0

I have custom button of URL type where in I pass some field values, record type etc as shown below

 

https://xxx.salesforce.com/a1l/e?CF00N20000002oGtq={!ABC__c.Name}&CF00N20000002oGtq_lkid={!ABC__c.Id}&00N20000002o7Mi=Bus+Conversion&RecordType=01220000000AGAR

 

In this URL, can i make a field "Orders" hidden/invisible. I dont want Orders field to be displayed completely.  Is there any way can I do that in the URL. (like 00N20000002o7Mi:hidden or anything else)

 

Please let me know, if its possible or any other alternative.

 

P.S: I dont want to create a new record type and new page layout with no Orders field in it.

 

Hi Friends

 

Is possible to get the child object records from parent object by using mail merge Feature.?  I am creating one mail merge document it contains the Parent and child records merge fields. The Mail merge templete returns information when i click the mail merge from child object. but it didnt work when i run in parent object..

 

Please let me know your valuable suggestion...

 

 

 

Thanks

Sundar

 

Created a new custom button of type URL and am passing values into it using merge fields.

 

Everything is fine but when the {!Opportunity.Name} contains "&", the URL breaks!

 

 

/setup/ui/recordtypeselect.jsp?ent=01I200000007SWS&retURL=%2F{!Opportunity.Id}&Name=Auto+Number&
save_new_url=%2Fa1l%2Fe%3FCF00N20000002o7Kh%3D{!Opportunity.Name}
%26CF00N20000002o7Kh_lkid%3D{!Opportunity.Id}%26retURL%3D%252F{!Opportunity.Id}&
CF00N20000002oGth={!Opportunity.Account}&CF00N20000002oGth_lkid={!Opportunity.AccountId}

 

 
 

How do I stop the URL break ,if the name contains '&' ?

 

Help!

 

Hi,

I am writing following code in Attachment Trigger.
I want to get the Body content of Attachment after update and before delete, but its returning null in both the cases.
Only in case of insert i am able to fetch the body content of attachment. Here is the code:



trigger attachmentHistoryManager on Attachment (after insert, after update,before delete)
{
    List<AttachmentHistory__c> lstHistoryToBeIns = new List<AttachmentHistory__c>();
  
    if(trigger.isBefore && trigger.isDelete)
    {
      
        for(Attachment objAttach : trigger.old)
        {
            AttachmentHistory__c objHistory = new AttachmentHistory__c();
            system.debug('*****Printing Old Attachment Body data'+objAttach.body);
            objHistory.Body__c = Encodingutil.base64Encode(objAttach.body);
           
            lstHistoryToBeIns.add(objHistory);
         
        }
    }  
    if(trigger.isAfter)
    {
       
        for(Attachment objAttach : trigger.new)
        {
       
            AttachmentHistory__c objHistory = new AttachmentHistory__c();
            system.debug(Encodingutil.base64Encode(objAttach.Body));
           
            objHistory.Body__c = Encodingutil.base64Encode(objAttach.body);
            
            lstHistoryToBeIns.add(objHistory); 
         
        }
    }
    if(lstHistoryToBeIns!=null && lstHistoryToBeIns.size()>0)
    {
        Database.SaveResult[] lsr = Database.insert(lstHistoryToBeIns);
    }  
}

 

Can anyone there please help me out.

 

thanks.

  • June 09, 2011
  • Like
  • 0

Hi All,

 

I have a custom object (XYZ__c) under Opportunities as a related list (master-detail).

 

I had to pre-populate few fields in XYZ record when user clicks on 'NEW XYZ' button under the opportunity.

 

So, I used a custom button and replaced the standard NEW XYZ button in the page layout (of opportunity) passing values in the URL.

 

.........&Name=Auto+Number&RecordType=****************&saveURL=/{!XYZ__c.Id}&retURL=/{!XYZ__c.Id}

 

Everything is fine. But when users click on Save and New, these values are not prepolating, instead it re-directs user to record type selection page !!!!!!!! Becoz, after save its going to the standard NEW button in the XYZ object, which I haven't overriden.  I just replaced the new button in the pagelayout (of opportunity). 

 

I cannot over-write the standard NEW button of XYZ object with URL. I dont have any VF pages. I just need couple of fields to be pre-populated hence i am using URL to override. 

 

Any help would be highly appreciated!

 

Please help.

I rendering visualforce page as PDF. I am using data table to pull all the related lists into the VF page.

 

CRF__c is the main object. Address_Details__c is the child object (vlookup relation)

 

In a page block section called Address Details, there are 3 columns:

 

1) Address Type

2) Provide Post Code

3) Cease Post Code

 

If address type = Provide address, then only 1st and 2nd columns should be displayed.

If address type = Cease address, then only 1st and 3rd columns should be displayed.

 

For this, I am using output panel within the apex:columns. But its not working. If the condition satifies, the column header is missing in the output pdf.

 

 

<apex:pageBlock title="Address Details">
        <apex:dataTable value="{!CRF__c.Address_Details__r}" var="AD" columnsWidth="70px,70px" border="1" cellpadding="1">

<apex:column > <apex:facet name="header">Address Type:</apex:facet> <apex:outputText value="{!AD.Address_Type__c}"/> </apex:column> <apex:column> <apex:outputPanel rendered="{!AD.Address_Type__c=='Provide Address'}"> <apex:facet name="header" >Provide Post Code:</apex:facet> <apex:outputText value="{!AD.Provide_Post_Code__c}"/> </apex:outputPanel> </apex:column> <apex:column> <apex:outputPanel rendered="{!AD.Address_Type__c=='Cease Address'}"> <apex:facet name="header">Cease Post Code:</apex:facet> <apex:outputText value="{!AD.Cease_Post_Code__c}"/> </apex:outputPanel>
 </apex:column> </apex:dataTable> </apex:pageBlock>

 

Am i doing anything wrong. Please Help!!

 

 

Hi,

 

I have a class in sandbox and have it exported in a project in eclipse. When I run test for it in eclipse, it gives me 90% test coverage for it but when I run test in salesforce app front end it gives 75%. I have noticed that while running test in salesforce app it is not including the exception block as executed whereas in eclipse it does. I have put code in test method of that class to have the exception block executed.

 

to give you a brief about testmethod:

 

static testmethod void test1(){

 

try

{

.........test code for testing most part of the class

 

.......test code to generate exception so it can be caught in exception block below

 

}

 

catch(exception e)

{

....this exception block is empty in testmethod but has statements in class

}

 

} // end testmethod

 

 

Please help me out what can be possible cause of this issue and how it can be resolved.

 

Thanks!

 

  • November 10, 2010
  • Like
  • 0

Hi i have a canvas area where users draw their signatures, but how can i capture this as an attachment when saving?

I am having a word document stored in Document object. I need to retrieve only the content and display it in a VF page.

I have written the query in a controller class to get the body of the document. The body is returning as Blob data type. Then I am converting the Blob to String using ToString() method in Apex.

Code for your reference:
----------------------------------
Document d = [Select body, bodyLength, ContentType, Url from Document where id = :'01580000000n17L'];
Blob b = d.body;
String s = b.toString();

But the output is showing as more encoded characters along with the content. These encoded characters, I suppose, are meta-data for the word document like font properties, alignment, etc. I need only the content of the document.

In the same way, if I use a Notepad file to get the content, it is working fine and I get only the content.

Please tell me a way to get the content only from a Word document without the encoded characters.

I have the following VF component that is just 2 table rows and a closing table tag.

 

<apex:component controller="pageExClass">
<tr style="" height="80%">
<td height="80%">&nbsp;</td>
<td height="80%">&nbsp;</td>
<td height="80%">&nbsp;</td>
<td height="80%">&nbsp;</td>
<td height="80%">&nbsp;</td>
<td height="80%">&nbsp;</td>
</tr>
<tr>
<td colspan="2" height="35">&nbsp;</td>
<td bgcolor="#c0c0c0" colspan="1" class="txtb big3">Total</td>
<td class="nobr txtb">{!NumMemoItems}</td>
<td colspan="1" height="35">&nbsp;</td>
<td bgcolor="#c0c0c0" colspan="1" class="nobr txtb"><apex:outputField value="{!MemoInfo.Total_Amount__c}"/></td>
</tr>
</table>

</apex:component>

 

 If is use it in a page being rendered to html it properly creates the table and rows like so: html table  if I render to pdf the table is broken like so:  pdf table

 

Copying and pasting the component into the page directly fixes the issue. Does anyone know if there is some html being automatically created when you insert a component?

 

--Greg

 

OK, I give up.
How do I create an image map using the commandLink and image components?
The commandLink component has a coordinate attribute just as an HTML <area> tag has, and the image tag has ismap and usemap attributes, both for use with image maps. All this leads me to believe that creating image maps should be possible, but for the life of me I can't figure out how to do it.
And before you tell me to search before I post, believe me, I have. All I can find is references to the attributes I just mentioned, but no information on how to implement them.
 
Please, please, please help me!!