• mast0r
  • NEWBIE
  • 174 Points
  • Member since 2012

  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 47
    Replies

I am having a scenario where I have to make the selected option of the radio-button list highlighted i.e. bold.

<apex:selectRadio value="{!ItemData}" id="itemOptions">
                <apex:selectOption itemValue="Item 1" itemLabel="Item 1"/>
                <apex:selectOption itemValue="Item 2" itemLabel="Item 2"/>              
</apex:selectRadio>

If I select "Item 1" then the label for "Item 1" should become bold. I know this is possible using Javascript and CSS, but I am unable to find a way how to do it.

I have to use apex tags, html tags suggestions is not possible to implemented.

  • August 30, 2012
  • Like
  • 0

i have a field "Assignedto3" in my visual force page like:

 

<apex:outputLabel value="AssignedTo3" for="AssignedTo3"/>
        <apex:inputField id="AssignedTo3" value="{!tsk.Assigned2_To__c}"/>

 

I want it to be displayed ONLY when user clicks on a button "ADD"(to add one more user),in the visual force page,i need  help  in writing the "add" function in my custom controller and changes 2 b made in my vfpage

  • August 30, 2012
  • Like
  • 0

I am  trying to create a new formula field and what I need the formula to do is

 

if checkbox field Bata Agreement is check and if CQI Exisits Rollup is greater than or equal to 1 read true if not read false, below is the formula that I am trying to use. I keep getting an syntax error that i am missing a ')'. I can't figure out what I am doing wrong.

 

IF(

AND(

(Beta_Agreement_c, "1"),

(CQI_Exisits_Rollup_c >= 1),

"TRUE", "FALSE"))

Hi,

 

I want to know how to get value about this tab on Visualforce page.

 

 

Thank you!

Hi,

 

I am looking for a code where i can get the list or available user to whom i can assign task.

For example i have a task "Ticket" to be assigned so need to get list of all the user who are available at that time according to availability on the user's calendar.

Any help is highly appreciated.

 

Thanks,

AKC

 

My VF have different status.which control what to render on the page, and the buttons on the page change the page status.

When I click the button on the VF,The controller did not trigger the action.But the VF page refresh to the initial status.

 

<apex:page standardController="APTable__c" extensions="CreateAPTable">
<apex:outputPanel style="color:red">
<apex:messages />
</apex:outputPanel>
<style type="text/css">
.custPopup{
background-color: white;
border-width: 2px;
border-style: solid;
border-color: rgb(14,158,207);
z-index: 9999;
left: 50%;
padding:10px;
position: absolute;
width: 500px;
margin-left: -250px;
top:100px;
text-align:center;
}
.popupBackground{
background-color:black;
opacity: 0.20;
filter: alpha(opacity = 20);
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 9998;
}

</style>
<apex:form >
<apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!shouldpopup}"/>
<apex:outputPanel styleClass="custPopup" layout="block" rendered="{!shouldpopup}">
<apex:outputPanel layout="block">请选择连锁系统</apex:outputPanel>
<apex:outputPanel layout="block"><apex:outputText value="非NKA连锁系统"></apex:outputText>
<apex:selectList value="{!sLink1}" size="1">
<apex:selectOptions value="{!NKAoptions1}"/>
</apex:selectList></apex:outputPanel>
<apex:outputPanel layout="block"><apex:commandButton value="确定" action="{!closePopup}"/><apex:commandButton value="取消" action="{!popcancel}"></apex:commandButton></apex:outputPanel>
</apex:outputPanel>
<apex:pageBlock title="创建AP表第一步,选择客户" rendered="{!isstep1}">
<apex:pageBlockButtons >
<apex:commandButton action="{!step1}" value="下一步" rendered="{!hideprovince}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection >
<apex:inputField value="{!apt.Account__c}">
<apex:actionSupport event="onchange" action="{!chooseaaccount}"/>
</apex:inputField>
<apex:pageBlockSectionItem rendered="{!hideprovince}">
<apex:outputText value="省区"></apex:outputText>
<apex:selectList value="{!pId}" size="1" >
<apex:actionSupport event="onchange" action="{!chooseprovince}"/>
<apex:selectOptions value="{!poptions}"/>
</apex:selectList>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem rendered="{!hideprovince}">
<apex:outputText value="城市"></apex:outputText>
<apex:selectList value="{!cid}" size="1" disabled="{!NOT(control1)}">
<apex:selectOptions value="{!cityoptions}"/>
</apex:selectList>
</apex:pageBlockSectionItem>

<apex:pageBlockSectionItem rendered="{!hideprovince}">
<apex:outputText value="NKA/非NKA" ></apex:outputText>
<apex:selectList value="{!sNKA}" size="1">
<apex:selectOptions value="{!NKAoptions}"/>
</apex:selectList>
</apex:pageBlockSectionItem>

<apex:pageBlockSectionItem rendered="{!hideprovince}">
<apex:outputText value="连锁系统"></apex:outputText>
<apex:selectList value="{!sLink}" size="1">
<apex:selectOptions value="{!Linkoptions}"/>
</apex:selectList>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem ></apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock title="创建AP表第二步,选择门店" rendered="{!isstep2}">
<apex:pageBlockButtons >
<apex:commandButton action="{!prestep}" value="上一步" />
<apex:commandButton action="{!step2}" value="下一步" />
</apex:pageBlockButtons>
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputText value="门店"></apex:outputText>
<apex:selectList value="{!sId}" size="1">
<apex:selectOptions value="{!soptions}"/>
</apex:selectList>
</apex:pageBlockSectionItem>
<!--<apex:inputField value="{!tempobj.Store__c}"></apex:inputField>-->
<apex:pageBlockSectionItem >
<apex:commandButton value="添加" action="{!addcity}"></apex:commandButton>
<apex:commandButton value="添加所有门店" action="{!addAll}"></apex:commandButton>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem ></apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockTable value="{!apsts}" var="o" rendered="{!tcount}">
<apex:column width="10%"><apex:commandLink value="删除" action="{!itemdelete}">
<apex:param name="objid" value="{!o.Store__c}"/></apex:commandLink></apex:column>
<apex:column value="{!o.Store__c}"></apex:column>
</apex:pageBlockTable>
</apex:pageBlock>

<apex:pageBlock id="page" title="创建AP表第三步,输入详细信息" rendered="{!isstep3}">
<apex:pageBlockButtons >
<apex:commandButton action="{!onSave}" value="确定"/>
<apex:commandButton action="{!onCancel}" value="退出"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="请输入数据" id="inputdata">
<apex:inputField value="{!apt.StoreDescription__c}"></apex:inputField>
<apex:inputField value="{!apt.StoreQuantity__c}"></apex:inputField>
<apex:inputField value="{!apt.APBrand__c}"></apex:inputField>
<apex:inputField value="{!apt.Campaigns__c}" >
<apex:actionSupport event="onchange" action="{!campaignchanged}" rerender="page"/>
</apex:inputField>
<apex:inputField value="{!apt.AccountType__c}" >
<apex:actionSupport event="onclick" action="{!accounttypeprotect}"/>
</apex:inputField>
<apex:inputField value="{!apt.CostType__c}" >
<apex:actionSupport event="onchange" action="{!CostTypechanged}"/>
</apex:inputField>
<apex:inputField value="{!apt.DetailCostType__c}" >
<apex:actionSupport event="onchange" action="{!DetailCostChanged}" />
</apex:inputField>
<apex:inputField value="{!apt.TFItype__c}" rendered="{!isTFI}">
</apex:inputField>
<apex:inputField value="{!apt.Payment__c}"></apex:inputField>
<apex:inputField value="{!apt.ReceivablesObject__c}"/>
<apex:inputField value="{!apt.ReceivablesObjectName__c}"/>
<apex:inputField value="{!apt.Applicant__c}"/>
<apex:inputField value="{!apt.beginDate__c}"/>
<apex:inputField value="{!apt.endDate__c}"/>
<apex:outputField value="{!apt.Retail_Customers__c}" rendered="{!showNKA}"/>
<apex:outputField value="{!apt.NKA__c}" rendered="{!showNKA}"/>
<apex:pageBlockSectionItem rendered="{!showNKA}" >
<apex:outputText value="费用归属"></apex:outputText>
<apex:selectList value="{!apt.BudgetSource__c}" size="1">
<apex:selectOptions value="{!bsoptions}"></apex:selectOptions>
</apex:selectList>
</apex:pageBlockSectionItem>
<apex:inputField value="{!apt.Remarks__c}"></apex:inputField>
</apex:pageBlockSection>
<apex:pageBlockSection title="产品相关费用明细" rendered="{!productrelated}">
<apex:inputField value="{!apt.Product__c}"/>
<apex:inputField value="{!apt.StandardPrice__c}"/>
<apex:inputField value="{!apt.PromotionPrice__c}"/>
<apex:inputField value="{!apt.StoreStandardPrice__c}"/>
<apex:inputField value="{!apt.StorePromotionPrice__c}"/>
<apex:inputField value="{!apt.PromotionProdcutNumber__c}"/>
<apex:inputField value="{!apt.PromotionPriceAdd__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="临促工资费用明细" rendered="{!promotion}">
<apex:inputField value="{!apt.PromotionSalary__c}"/>
<apex:inputField value="{!apt.PromoterNumber__c}"/>
<apex:inputField value="{!apt.PromotionDay__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="费用明细" rendered="{!othercost}">
<apex:inputField value="{!apt.FeeDescription__c}"/>
<apex:inputField value="{!apt.applicationamount__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection id="campaigninfo" title="市场活动信息" rendered="{!campaignisfilled}">
<apex:outputField value="{!apt.CampaignType__c}"/>
<apex:outputField value="{!apt.CampaignItem__c}"/>
<!-- <apex:outputField value="{!apt.CampaignCode__c}"/>-->
<apex:outputField value="{!apt.CampaignDescription__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>


<apex:pageBlock rendered="{!checkVal}">
<apex:pageBlockTable value="{!apts}" var="o">
<apex:column headervalue="AP表号"><apex:outputLink value="/{!o.id}">{!o.Name}</apex:outputLink></apex:column>
<apex:column headervalue="活动" value="{!o.Campaigns__c}"></apex:column>
<apex:column headervalue="金额" value="{!o.Total__c}"></apex:column>
<apex:column headervalue="客户类型" value="{!o.AccountType__c}"></apex:column>
<apex:column headervalue="费用大类" value="{!o.CostType__c}"></apex:column>
<apex:column headervalue="费用小类" value="{!o.DetailCostType__c}"></apex:column>
<apex:column headervalue="需交核销凭证" value="{!o.writeoffverification__c}"></apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>

 

any suggestion would be thanked

  • August 27, 2012
  • Like
  • 0

Hi guys,

Am  stuck here and I really need your help.

I have two custom objects Jobs__c and Shortlists__c.

Jobs__c is the Parent object and Shortlists__c is the child object.

 

Each Job can have many shortlists. Now what I want is to write a query will retrieve Job Name with corresponding number of shortlists

 

 

E.g.

 

______________________
Job Name       No.Shortlists
______________________
J2ee                 10           

______________________

  • August 27, 2012
  • Like
  • 0

Hi,

 

My scenario is I have Contact Related list on Account Page. Account are either Parent or Child.

 

If Account is parent only admins can create contact role and if it is child admins and other users can create contact role for it. How can I create a validation rule for this. Is there any way?

 

Thanks in advance, Any help will be appreciated.

 

 

the values inserted by me through visualforce page how to display in same page

 

 

 

<apex:column headervalue="Select"> <apex:actionregion >
<apex:actionsupport action="{!selectedContact}" event="onclick" >
<input type="radio" name ="contact" />
<apex:param name="conid" value="{!con.Id}" assignTo="{!conid}">
</apex:param> </apex:actionsupport></apex:actionregion>
</apex:column>

 

// tried public selectedcontact() instead of page reference

Public pagereference selectedContact(){
selcontactid = System.currentPagereference().getParameters().get('conid');
system.debug('selected contact:::::::::::::'+selcontactid);
system.debug('selected contact conid:::::::::::::::::'+conid);
return null;
}

 

the method is being called ut the conid is printing null

  • August 31, 2012
  • Like
  • 0

Hi - I have a drop down on a VF page that displays the number of pages of records.

I want to be able to programmatically set the drop down value to '1' when the user sorts by any column header.

I know this should be pretty simple, but I've been searching for an answer and cannot find anything.....

Here's the VF code for populating the drop down with data from the controller

 

<apex:selectList id="pgnm" size="1" value="{!pagenum}" onChange="changePage(this.options[this.selectedIndex].text);">
             	<apex:selectOptions value="{!pageNumbers}"/>
                </apex:selectList>
                <br/>
                <apex:actionFunction name="changePage" action="{!goToPage}" rerender="out" status="loading">
     				<apex:param assignTo="{!pagenum}" value="" name="pagenum"/>
   				</apex:actionFunction>

 

Here's the code that I want to cause the reset of the drop down to '1':

<apex:facet name="header" >
                    <apex:outputLink onclick="SortByStuLastName();return false;">Student Name</apex:outputLink>
                </apex:facet>

 I've tried adding a javascript function after the return false;  and calling it like this:setPageNum(' {!$Component.ltrowner}') but this did not work...

function setPageNum(val){
		document.getElementById(val).value = '1';
  }

 Your help is greatly appreciated!

  • August 30, 2012
  • Like
  • 0

Picklist has three choices, the last one of which is "Other".  If "Other" is chosen, open the next field to enter data.  So the text field is invisible unless "other" is chosen in the picklist, at which time it appears and user sees instructions to enter the "Other" data.

1.Create quote button from opportunity page (detail page) is giving the below error when clicked.
  This custom button is calling URL /apex/ManageQuote/ apex code but its giving error

Error
--System.NullPointerException: Attempt to dereference a null object line 31 column 1 which is under public PageReference createQuote() of ManageQuoteController code.

 

can let us know what is the issue?Thanks in advance for help

 

 


Code snippet:
---ManageQuoteController code
:
public with sharing class ManageQuoteController {
    //Opportunity Reference
    public Opportunity opportunityRef {get; set;}
    //Quote Creation Error
    public Boolean quoteCreationError {get; set;}
    //Quote created indicator
    public Boolean quoteCreated {get; set;}
    //Error Message
    public String errorMessage {get; set;}
    //Quote URL
    public String quoteUrl {get; set;}
    //Default Controller
    public ManageQuoteController() {
        quoteCreated = false;
        quoteCreationError = false;
        Id opptyId = ApexPages.currentPage().getParameters().get('opportunity.id');
        try{
        opportunityRef = [select Id, Name from Opportunity where Id = :opptyId];
        }
        catch (System.QueryException e) {
          System.debug('caught ya!');
        }
    }
   
    public PageReference goback() {
        return new Apexpages.Standardcontroller(opportunityRef).view();
    }
   
    public PageReference createQuote() {
        Opportunity oppty = [select Id, Name, StageName, CloseDate, Owner.Name, AccountId, Account.Name,
            Account.Sic, Account.Industry, Account.BillingStreet, Account.BillingCity, Account.BillingState,
            Account.BillingPostalCode, Account.BillingCountry from Opportunity where Id = :opportunityRef.Id];
        OpportunityContactRole ocr = [select Contact.FirstName, Contact.LastName, Contact.EMail, Contact.Phone, Contact.Fax
            from OpportunityContactRole where opportunityId = :opportunityRef.Id and IsPrimary = true];
        QuoteResponse response = QuoteServiceDelegate.createQuote(oppty, ocr.Contact);
        if (response.stausCode != 200) {
            quoteCreationError = true;
            errorMessage = response.message;
        } else {
            quoteCreated = true;
            quoteUrl = response.quoteUrl;
        }
        return null;
    }
}



---Manage Quote code

<apex:page name="ManageQuote" controller="ManageQuoteController" id="thisPage" tabStyle="Opportunity">
        <script type="text/javascript">
                function init() {
                        if ('{!quoteCreationError}' == 'false' && '{!quoteCreated}' == 'false')
                                createQuote();
                }
                window.onload = init;
    </script>
        <apex:form >
                <apex:actionFunction name="createQuote" action="{!createQuote}"  rerender="outputBlock, quoteBlock" status="createStatus" />
                <apex:sectionHeader title="Manage Quote" subtitle="{!opportunityRef.Name}"/>
                <apex:outputPanel id="outputBlock">
                        <apex:actionStatus id="createStatus">
                                <apex:facet name="start">
                                        <apex:pageBlock >
                                                <apex:outputText >Creating quote. Please wait...</apex:outputText>
                                        </apex:pageBlock>
                                </apex:facet>
                        </apex:actionStatus>
                </apex:outputPanel>
                <apex:outputPanel id="quoteBlock">
                        <apex:pageBlock id="errorBlock" title="Error" rendered="{!quoteCreationError}">
                                <apex:pageBlockButtons location="bottom">
                                        <apex:commandButton value="Go Back" action="{!goback}" />
                                </apex:pageBlockButtons>
                                <apex:pageBlockSection columns="1">
                                        <apex:outputText value="{!errorMessage}"/>
                                </apex:pageBlockSection>
                        </apex:pageBlock>
                        <apex:iframe src="{!quoteUrl}" scrolling="true" id="quoteFrame" rendered="{!quoteCreated}"/>
                </apex:outputPanel>
        </apex:form>
</apex:page>

  • August 30, 2012
  • Like
  • 0

So here's the background:

 

I have a master-detail hierarchy that goes: School Implementations-->Teacher Implementations-->Class Implementations. There is a lot of data that we store at the Class Implementation level (How many hours has the class used our program, what is the average class score on our program, etc) that we want to email out to a contact, specifically the school principal. I would like to create a visualforce email template that can capture all of the data from the class implementation records that are grandchildren of a school implementation and list them as rows in a single table, something like this:

 

Class Name

Hours online

Problem accuracy

Class A

3.2

78%

Class B

3.8

74%

Class C

2.5

70%

 

My main question, then, is if I have a school (Parent object) with 5 teachers(child object) and each teacher has 3 classes (grandchild object), how do I get all 15 of those classes displayed as rows on a single table in an email template?

 

Is this possible? If so, I would be very grateful for any direction that I can get. Thanks!

  • August 30, 2012
  • Like
  • 0

Hi,

 

I know there are plenty of explanations on how to pass a parameter from Salesforce to Apex, but they dont solve my question.

 

I have a button on account, Request Extension, that takes the user to a visualforcepage asking him the reason of the extension. I need to take the answer of the user  and pass it over to another visualforce page. I want to pass the paramenter through the URL.

 

This is my solution that so far I didnt make it work....

 

Visualforce page

 

<apex:page standardController="Account" showHeader="true" showChat="true" tabStyle="Account" extensions="AccountExtension">
    <apex:sectionHeader title="Main Account Extension" subtitle="{!Account.Name}"/>
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockButtons >
                <apex:commandButton value="Next" action="{!EditExtensionData}">
                    <apex:param name="Reason" value="{!Account.Atlas_Code_Usage__c}"/>
                </apex:commandButton>   
                <apex:commandButton value="Cancel" action="{!cancel}"/>
            </apex:PageBlockButtons>
            <div style="position:absolute; top:120px; left:380px;">    
                <apex:outputLabel value="Extension Reason"/>
                <apex:inputField value="{!Account.Atlas_Code_Usage__c}""/>
            </div>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 The field Atlas_Code_Usage will belong to the new Extension account I want to create, not to the one the user starts the wizard from.

 

This is the controller code:

 

public with sharing class AccountExtension {
    private Account acc1;
    private Account acc2;
    
    public AccountExtension(ApexPages.StandardController stdController) {
       this.acc1 = (Account)stdController.getRecord();
       this.acc2= [Select Id,Atlas_Code_Usage__c From Account Where (Id=:acc1.Id)];
    }
    
    public PageReference EditExtensionData()
    {
    	String ExtensionReason = System.currentPageReference().getParameters().get('Reason');
    	PageReference pageRef= new PageReference('/apex/ExtensionData?id='+acc1.Id+'&Reason='+ExtensionReason);
        pageRef.setredirect(true);
        return pageRef;
    }
}

 What I get as result is the following:

 

https://c.cs7.visual.force.com/apex/ExtensionData?id=001M000000Jbe7tIAB&Reason=null

 

Never get a value in the parameter I want to pass over.

 

Really appreciate your help.

 

Regards,

 

Antonio

I am having a scenario where I have to make the selected option of the radio-button list highlighted i.e. bold.

<apex:selectRadio value="{!ItemData}" id="itemOptions">
                <apex:selectOption itemValue="Item 1" itemLabel="Item 1"/>
                <apex:selectOption itemValue="Item 2" itemLabel="Item 2"/>              
</apex:selectRadio>

If I select "Item 1" then the label for "Item 1" should become bold. I know this is possible using Javascript and CSS, but I am unable to find a way how to do it.

I have to use apex tags, html tags suggestions is not possible to implemented.

  • August 30, 2012
  • Like
  • 0

i have a field "Assignedto3" in my visual force page like:

 

<apex:outputLabel value="AssignedTo3" for="AssignedTo3"/>
        <apex:inputField id="AssignedTo3" value="{!tsk.Assigned2_To__c}"/>

 

I want it to be displayed ONLY when user clicks on a button "ADD"(to add one more user),in the visual force page,i need  help  in writing the "add" function in my custom controller and changes 2 b made in my vfpage

  • August 30, 2012
  • Like
  • 0

Hi

I am Retriving the Opportunitylineitem  and  am able to displaying in the Pageblocktable on the page of the curent Products

I have more than 500 records. i am not display on the Page.

i want to keep the Pagination can u please help me

Historicaloppl=[select id,unitprice,PricebookEntry.Product2Id,product__c,PricebookEntry.Product2.Name,Opportunity.Product__r.Id,Product__r.Name,
Opportunity.Product__r.name,Purchase__c, PricebookEntryId,ServiceDate,Quantity,Action__c,Vendor__r.Name ,Opportunity.Name,Opportunity.StageName
from OpportunityLineItem where opportunityid!=: OPP.id and product__c=:userinput.product__c order by unitprice ];

  • August 30, 2012
  • Like
  • 0

Hi,

 

I'm working on a SharePoint application. Now there is a new feature that requires the integration between SharePoint and Saleforce. Here is the inital idea: when a Saleforce user edits a Contract (or any kind of sObject) in Saleforce site, I'd like to have a new custom textbox field and a button next to it. Clicking on button results opening a new window in browser that lists documents related to the Saleforce user, and in new window they can select a document, then the id of selected document is saved back in the custom field of Contract object being edited.

 

I learnt that Visualforce can create page and custom component but it doesn't seem to match with what I need. I didn't see the help on how to to inject custom component to standard page layout :(

 

The problem I'm having is that I don't know how to implement the custom field with additional logic like that in order to insert to these View Detail and Edit layouts. Can you show me any hint or related guideline ?

 

Thanks,

Duy

  • August 30, 2012
  • Like
  • 0

HI their,

 

   I can't see the google map in VF page when I copy and paste the code here is my code......Dnt knw y?help pls

 

<apex:page standardController="Account">

<head>

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">

$(document).ready(function() {

var myOptions = {
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false
}

var map;
var marker;

var geocoder = new google.maps.Geocoder();
var address = "{!Account.BillingStreet}, " + "{!Account.BillingCity}, " + "{!Account.BillingPostalCode}, " + "{!Account.BillingCountry}";

var infowindow = new google.maps.InfoWindow({
content: "<b>{!Account.Name}</b><br>{!Account.BillingStreet}<br>{!Account.BillingCity}, {!Account.BillingPostalCode}<br>{!Account.BillingCountry}"
});

geocoder.geocode( { address: address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK && results.length) {
if (status != google.maps.GeocoderStatus.ZERO_RESULTS) {

//create map
map = new google.maps.Map(document.getElementById("map"), myOptions);

//center map
map.setCenter(results[0].geometry.location);

//create marker
marker = new google.maps.Marker({
position: results[0].geometry.location,
map: map,
title: "{!Account.Name}"
});

//add listeners
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
});
google.maps.event.addListener(infowindow, 'closeclick', function() {
map.setCenter(marker.getPosition());
});

}

} else {
$('#map').css({'height' : '15px'});
$('#map').html("Oops! {!Account.Name}'s billing address could not be found, please make sure the address is correct.");
resizeIframe();
}
});

function resizeIframe() {
var me = window.name;
if (me) {
var iframes = parent.document.getElementsByName(me);
if (iframes && iframes.length == 1) {
height = document.body.offsetHeight;
iframes[0].style.height = height + "px";
}
}
}

});
</script>

<style>
#map {
font-family: Arial;
font-size:12px;
line-height:normal !important;
height:250px;
background:transparent;
}
</style>

</head>

<body>
<div id="map"></div>
</body>
</apex:page>

 

 

I have edited the layout of Account by Visualforce page also....

Hi,

 

I have a requirement like I want to enter some date value to a date field only when the check box is selected.

 

That date field should be non-editable or invisible if the check box is not selected. 

 

I know this will be done through VF pages. But I need to be done this scenario without using VF pages and apex classes. 

 

Can anyone please help on this?

 

 

Thanks,

Arunkumar