• DJ Rock your own style
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 19
    Questions
  • 13
    Replies
Hi, Is it possible to get a javascript prompt or something like that on click of save in standard page? I know it can be done by a vf but would like to have a customized save button or something of that sort which would prompt the user on satisfactory conditions. Thanks in advance, Dave

Dear all,

 

We have made a vf for opportunity which is called on click of a button in the opportunity related list. The problem is with performance wherein it takes much more time to load than expected.

 

We thought of the following solution:

 

In code where we are querying the opportunities to show on VFpage, we can use an external id field (indexed  field) to concatenate the fields on which we are making a filter (AND clauses)

 

Here is our query:

 

  lstOpportunity = [Select o.Id, o.Name, o.Status__c,o.Account.City_EFS_c__r.Name,o.Account.Pin_Code_EFS_c__r.Name,o.opportunity_status__c,o.Product_Name__r.name, o.Product_Name__r.category__c,
                              o.Account.Id, o.Account.Name, o.Account.LastName__c,o.Account.CIS_No_new__c,Loan_Amount__c 
                              From Opportunity  o where 
                              o.Status__c ='Active' and o.opportunity_status__c =''
                              and o.Product_Name__r.category__c =: strCategory 
                              and o.Product_Name__r.Name=:strProduct
                              and o.Account.City_EFS_c__r.Name =: strCity 
                              and o.Account.Pin_Code_EFS_c__r.Name =: strPincode 
                              and o.Id not in :lstOppWithAppsIds];

 

 

Is it possible to index a concatenated field?

 

Is the approach we are talking about achievable?

 

Please let us know if anyone has worked on it. Any help will be appreciated.

Hi ,

I have one javascript button , Go with the any record and when we click on button one popup window came 

i.e VF page window.. 

Add one field and click on save button on that widow it should be save and close...

 

Javascript button code is this,

{!REQUIRESCRIPT("/soap/ajax/8.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/15.0/apex.js")}

 

var url="/apex/commentspage?&id= {!Contact.Id}";

newWin=window.open(url, 'Popup','height=500,width=600,left=150,top=150,resizable=yes,scrollbars=no,toolbar=no,status=no');

if (newWin.focus())
{
newWin.focus();

}

 

 

After creation of button.

Go with contact record, there is one button available right,

Then click on that button one VF page popup window came.

The VF page is.. 

<apex:page controller="commentspage" showHeader="false" sidebar="false" showChat="false" standardStylesheets="false" >

<script type="text/javascript">
function closeWin(){
self.close();
}
</script>

<apex:form > <br/><br/>
<div align="center">
<apex:inputTextarea value="{!CommentText}"/><br/><br/>
<apex:commandButton oncomplete="closeWin" action="{!save}" value="Save" id="theButton"/>
</div>
</apex:form>
</apex:page>

 

 

The Action performed on controller...

Please solve my problm...

Hi,

 

I have an apex pageblock table inside an output panel. This panel has a field called target which has to be updated to true on click of a button in the same panel. Here is the piece of the code.

 

<apex:commandLink action="{!target}"  id="prospectbutton1" status="loadingstatus" rerender="StrategicTargetingBlock">

 

Here is the field inside the same output panel(ie: strategictargetingblock)

 

<apex:outputField id="T" value="{!e.c.T__c}"/>

 

This field is not being updated on click of the commandlink. But when i refresh the entire page by f5, the update is reflected. Seems like the value is refreshed only on client UI but not from the server.

Please help out.

 

Thanks and regards,

Dave.

Hi All,

 

I have an inline vf in a record detail page. I would like to hide some attributes of the record detail (say notes and attachments) by calling a javascript from the inline. Below is the snippet:

 

<script>
    
    var previousOnload = window.onload;        
    window.parent.onload = function() {
        if (previousOnload) {
            previousOnload();
        }
document.getElementsByClassName('listRelatedObject Custom78Block')[0].style.display = 'none'
    }

</script>

 

Here i ve got the class name by inspecting the element in browser. But when i try to run this, i get an error in the error console as: Permission denied to access property onload......

 

Is there any workaround for this?

 

Thanks in advance,

 

Dave.

Hi All,

 

I have developed an inline vf for notes and attachment which displayes all the notes and attachments related to the master object record and the related child objects too. It is working fine but i need to display in cloud console view. I have never worked on the same before. Please help. Here is my code:

 

 

<apex:page standardController="Deal__c" extensions="Dealext" showHeader="false">

<script>
function refresh() {
confirm('Do you want to Delete?');
window.top.location='/{!dl.id}';
}
</script>

<apex:form >

<apex:pageblock mode="edit">

<apex:pageblockbuttons location="top">
<apex:commandbutton value="New Note" onclick ="window.top.location='/002/e?parent_id='+'{!theid}'+'&retURL=/'+'{!dl.id}'"/>
<apex:commandbutton value="Attach File" onclick="window.top.location='/p/attach/NoteAttach?pid='+'{!dl.id}'+'&retURL=/'+'{!dl.id}'"/>
<apex:commandbutton value="View All" id="viewall" rendered="{!nextpage}" onclick="commentOpenSubtab(); return false"/>
</apex:pageblockbuttons>
<apex:pageBlockTable value="{!notesandattchlist}" var="a" rows="5" >
<apex:column >
<apex:facet name="header">Action</apex:facet>
<apex:outputLink onclick= "window.top.location= '/{!IF(a.type,a.n.id,a.a.id)}/e?retURL=/{!dl.id}'" style=" text-decoration:none; color:#236FBD">Edit&nbsp;</apex:outputLink>
<apex:outputLink onclick= "window.top.location= '/servlet/servlet.FileDownload?file={!a.a.id}'" rendered="{!NOT(a.type)}" style="text-decoration:none; color:#236FBD" >| View&nbsp;</apex:outputLink>
<apex:commandlink onclick="return refresh();" style="text-decoration:none; color:#236FBD" action="{!del}" value="| Del">
<apex:param name="did" value="{!IF(a.type,a.n.id,a.a.id)}"/>
</apex:commandlink>

</apex:column>
<apex:column headervalue="Title" >
<a href="#">
<apex:outputLink onclick="window.top.location='/{!a.n.id}'" rendered="{!a.type}"> {!a.title} </apex:outputLink></a>
<a href="#">
<apex:outputLink onclick="window.top.location='/{!a.a.id}'" rendered="{!NOT(a.type)}">{!a.title} </apex:outputLink></a>
</apex:column>


<apex:column >
<apex:facet name="header">Related to</apex:facet>
<apex:outputfield value="{!a.n.parentid}" rendered="{!a.type}"></apex:outputfield>
<apex:outputlink value="/{!a.a.parentid}" rendered="{!NOT(a.type)}" > {!a.parentname}</apex:outputlink>
</apex:column>

<apex:column >
<apex:facet name="header">Last Modified</apex:facet>
<apex:outputfield value="{!a.n.LastModifiedDate}" rendered="{!a.type}" />
<apex:outputfield value="{!a.a.LastModifiedDate}" rendered="{!NOT(a.type)}" />
</apex:column>

<apex:column >
<apex:facet name="header">Created by</apex:facet>
<apex:outputfield value="{!a.n.CreatedById}" rendered="{!a.type}" />
<apex:outputfield value="{!a.a.CreatedById}" rendered="{!NOT(a.type)}" />
</apex:column>

</apex:pageBlockTable>

</apex:pageblock>
<apex:commandLink value="Show more>>" rendered = "{!nextpage}" onclick="window.top.location='/apex/Deal_view_all?id='+'{!dl.id}'+'&retURL=/'+'{!dl.id}'"/>
</apex:form>


</apex:page>

Hi All,

 

I have a requirement of having apex:commandlink on a hover window.

 

I have an outputlink on my main vf page. Requirement is,when i hover my mouse on that link, a window should pop up(Like salesforce standard functionality) with few commandlinks on that hover window which i can define. Can someone help me out on this?

 

Thanks in advance,

 

Dave.

I'm using a formula field on the Accounts with a HYPERLINK function with some merged fields and it works fine on a desktop but when I use the mobile app it shows the whole field of characters with no link.  Is there a way to link and merge an account to an external website within the mobile app?

Hello.

 

I'm having trouble with a very simple VF page using the standard Contact controller. The code is below:

 

 

<apex:page standardController="Contact">
	<apex:form >
		<apex:detail subject="{!contact}" inlineEdit="true"/>
	</apex:form>
</apex:page>

When I inline edit a field and click the Save button, the buttons switch to "Saving..." and then the page just sits. It never refreshes. My complete VF page does contain additional code, but even when simplifying it to the simple code above, it still does not work. Inline editing works on the standard Contact page, which leads me to believe that it's not a trigger issue.

 

The identical code for the Account object, as seen below, works fine, leading me to believe it's not a browser issue (I've tested in Chrome, IE and Firefox):

 

<apex:page standardController="Account">
	<apex:form >
		<apex:detail subject="{!account}" inlineEdit="true"/>
	</apex:form>
</apex:page>

 

 

This appears to be bug, unless there's another explanation. Please advise. Thank you.

 

-Greg

 

 

Hi,

Is there a way to disable the Edit buttoni n the Enhanced list view? Thank you much.

 

Paul