• anjisalesforce@gmail.com
  • NEWBIE
  • 25 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 48
    Questions
  • 11
    Replies
Hi Friends, I have designed a form using visualforce. After filling the form, i attached a controller (Apex Class). I need to save the data to the database. Can you please help me Thanks suman

Hi all,

 

I am getting Phone Number but i want to retriveing all fields in pop up window. Can any one please help me.

 

 

Below code is my code:

 

 

<apex:page showheader="false" standardController="Account" recordsetVar="accounts" >
<apex:form >
<head>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<apex:includeScript value="{!URLFOR($Resource.jquery, '/js/jquery-1.8.0.min.js')}" />
<apex:includeScript value="{!URLFOR($Resource.jquery, '/js/jquery-ui-1.8.23.custom.min.js')}" />
<apex:stylesheet value="{!URLFOR($Resource.jquery, '/css/ui-lightness/jquery-ui-1.8.23.custom.css')}" />
<script>
$j = jQuery.noConflict();
$j(document).ready(function() {
$j("#phone").dialog({ autoOpen: false, modal: true, position: 'center' });
});

function showDialog(name, phone1, acno){

$j("#pnumber").html(phone1);
$j("#phone").dialog("open");
$j('#phone').dialog("option" , "title" , name);
$j('#phone').dialog('option', 'position', 'Left');
return false;
}
</script>
<style>
.accountLink { color: red; cursor: pointer; cursor: hand; }
</style>
</head>

<body>
<apex:dataList value="{!accounts}" var="account" id="theList">
<a href="" class="accountLink" onclick="return showDialog('{!account.name}', '{!account.phone}', '{!account.accountnumber}')"><apex:outputText value="{!account.name}"/></a>
</apex:dataList>

<div id="phone" >
<div style="float:left">Phone:</div><div id="pnumber"></div> <br/>
<div style="float:left">Account Number:</div>
</div>


</body>
<apex:outputText id="txt1" value="{!account.AccountNumber}" />
</apex:form>
</apex:page>

 

 

Thanks 

Anj

Hi guys.

 

Need a bit help from you people.

i want a pop up window show up when i click a radio button. when that pop up is shown no other button can be clicked in the page . The requirement is i have several radio button and input field in a page . when i click a radio button the background process is running , within that time i have to show the pop up window. For this i am using action status, action function . i am partially successful in this but the problem is while the pop up window shows on the screen i can click other button.

 

 

Please give me answers its very urgent requirement...

 

 

thanks for youe help

 

 

HI everyone,

 

My requirement is dispalying percentage(%) marks. I done my requirement but in percentage field it display like 60.89% but it dispalys after record saved like 6089.00%. Any one can solve this problem.

 

i taken one formula field that is Percentage__c in thhis field i want to display Percentage of the semester.

Already i created one read ony filed is TotalMArks__C.

 

My formula Expression code is :

 

Total_Marks__c / 7

 

Any one can please help this one...

 

Thanks for your helping...............

Hi all,

 

What is the use of Trigger.OldMap and Trigger.NewMap?

 

Can you please give me solution

 

Thanks for your help

Hi all,

 

What is the Difference Between ActionFunction and ActionSupport?

 

Please helpme it's very Urgent...

 

Thanks for your help

Hi all,

 

How to use JQuery in salesforce.com?

 

Cann you please provide any pdf with Examples

 

Thanks for your help.......

Hi all,

 

I created images folder, css Folder and Js files in Sample Folder. I compressed to rar file and upload static resource.

 

How to get the images from resource files to Vf page

Can you please solve this problem? please give with example

 

Thanks for your help.......

Hi all,

 

How to get the resource images in CSS file?

 

Please give me solution with Example....

 

Thanks for your Help

HI all,

 

I created one Test Class i.e:

 

@isTest
private class MileageTrackerTestSuite {

static TestMethod void runPostiveTestCases(){
Double totalMiles = 0;
final Double maxtotalMiles= 500;
final Double singletotalMiles= 300;
final String createdbyId = UserInfo.getUserId();
List<Mileage__c> deleteMiles = new List<Mileage__c>();
// Data clean-up
System.debug('Setting up testing - deleting any mileage records for today');
deleteMiles = [select miles__c from Mileage__c where createdDate = TODAY and createdById = :createdbyId];
if(!deleteMiles.isEmpty()){
delete deleteMiles;
}
// Positive tests
System.debug('Inserting 300 miles...');
Mileage__c testMiles1 = new Mileage__c(Miles__c = 300, Date__c = System.today() );
insert testMiles1;
// Validate single insert
for(Mileage__c m:[SELECT miles__c FROM Mileage__c WHERE createdDate = TODAY and createdById = :createdbyId
and miles__c != null]) {
totalMiles += m.miles__c;
}
System.assertEquals(singletotalMiles, totalMiles);
totalMiles = 0;
// Validate bulk insert
System.debug('Inserting 200 more miles...bulk validation');
List<Mileage__c> testMiles2 = new List<Mileage__c>();
for(integer i=0; i<200; i++){
testMiles2.add( new Mileage__c(Miles__c = 1, Date__c = System.today()) );
}
insert testMiles2;
// Assert Mileage
for(Mileage__c m:[SELECT miles__c FROM Mileage__c WHERE createdDate = TODAY and createdById = :createdbyId
and miles__c != null]) {
totalMiles += m.miles__c;
}
System.assertEquals(maxtotalMiles, totalMiles);
}
// Negative tests
static testMethod void runNegativeTestCases(){
System.debug('Inserting 501 miles... negative test case');
Mileage__c testMiles3 = new Mileage__c(Miles__c = 501, Date__c = System.today());
// Assert Error Message
try {
insert testMiles3;
} catch (DmlException e) {
// Assert Error Message
System.assert(e.getMessage().contains('Insert failed. ' + 'First exception on row 0; first error: ' + 'FIELD_CUSTOM_VALIDATION_EXCEPTION, ' + 'Mileage request exceeds daily limit(500): [Miles__c]'),e.getMessage());
// Assert Field
System.assertEquals(Mileage__c.Miles__c, e.getDmlFields(0)[0]);
// Assert Status Code
System.assertEquals('FIELD_CUSTOM_VALIDATION_EXCEPTION',
e.getDmlStatusCode(0));
}
}
}

 

I got One error message  is :

 

System.AssertException: Assertion Failed: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Mileage request exceeds daily limit: 500:[]

 

 

Can u please Solve this problem

 

Thanks for your Help....

HI all,

 

How to add salesforce - salesforce Connection?

 

What is use of Salesforce - salesforce connection? 

 

 

Can u plese help me....

 

Thanks 

Anjireddy

Hi all,

 

Q) How to deploye the salesforce code using ant Script in salesforce.com crm?

 

 

Please give me rply its urgent

 

Thanks for your help

Hi all,

 

Q) How many ways you can deploye the code in salesforce?

 

please give me help...

 

Thanks for your help.

HI all,

 

Q) What is the difference between Database.insert and Insert?

 

can you please give me rply its very urgent

 

thanks for your help....

HI all,

 

I am having one object in this i have four feilds. In pagelayout i am taking one field is Readonly.
How to enter data that field?

 

Please help me....

 

Thanks for u r help

 

Hi all,

 

What is dependent pick list and what is custom picklist?

 

 

 

Can u please Help Me....

 

Thanks for u r help

Hi all,

 

What happen after lead convertion?

 

please help me.....

 

Thanks for u help.....

Hi all,

 

I have create one Relation How to know that relation is look up or Master Details?

 

can u please help me....

 

Thanks for u r help..........

Hi all,

 

Q) 

How many Sandboxes are there in Enterprise Edition?

 

Can u please help me........

 

Thanks for u r help..........

Hi all,

 

Q) How many relationships there in salesforce? what is that?

 

Can u please give me tell me........

 

Thanks for u r help........

Hi all,

 

Q) I have 4 workflow "A, B, C and D" how to ececute these 4 workflows. First execute B next D next A next C.

 

How to execute this pattern ..........

 

Can u please solve this Problem immediatly........... Tis Urgent

 

 

Thanks for your help............

Hi all,

 

Q) How many ways you can deploye the code in salesforce?

 

please give me help...

 

Thanks for your help.

hi all,

 

How to assign css values in controls?

 

my code: 

<apex:page sidebar="false" showHeader="false" controller="Salonhome">
<apex:form style="background-color:yellow;">
<style>
.ff
{
width:80px; border: px solid #dadada; background: skyblue repeat-x; padding: 5px 3px; font: bold 12px Arial, Sans-serif;
}
</style>
<apex:commandButton value="Gallery" styleClass="ff"/>
</apex:form>
</apex:page>

 

this values doesn't effect button........

 

Can u please solve this problem its urgent..

 

 

thanks for u r help...

Hi Friends, I have designed a form using visualforce. After filling the form, i attached a controller (Apex Class). I need to save the data to the database. Can you please help me Thanks suman

Hi  I have created a visualforce page that renders an outputfield in this case it is the Account.PersonEmail. 

I now want this to be on the standard page layout next to another field but I want the style to be the same 

does anyone know the css i should do, currently the vs looks like this:

 

<page standardController="Account">

    <apex:outputLabel value="{!$ObjectType.Account.fields.PersonEmail.Label}"/>
    <apex:outputText value="{!Account.PersonEmail}"/>

</page>

 

Hi all,

 

How to send the parameters one page to another page using Apex class?

 

 

Thank u for u r help....


Hello,

 I got one error in this program. please solve this problem.

 

My code is:

 

<apex:page id="thepage" sidebar="false" showHeader="false" >


<script language="javascript" type="text/javascript">
function randomString() {
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
var string_length = 8;
var randomstring = '';
for (var i=0; i<string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum,rnum+1);
}
document.getElementById('thepage.randform.randomfield').value = randomstring;
}
</script>


<apex:form id="randform">
<h1><b>Create Random Number</b></h1>
<br/><br/>
<apex:commandButton value="Create Random String" onClick="randomString()" />
<apex:inputText id="randomfield" value="{!randomvalue}"/>
</apex:form>
</apex:page>

Hi all,

 

How to Find the Attachment object.....................

 

 

Thanking you,

Anjireddy

Hi All,

 

I am trying to bind visualforce value to an Apex class variable. Below is my sample code:

 

<textarea id="editor1" name="editor1">{!apexVariable}</textarea>

<apex:commandButton value="Check" action="{!check}"/>

Below is my Apex class:

 

public class MyClass

{

public String apexVariable{get;set;}

public void check()

{

System.debug(apexVariable+'>>>><<<<');

}

}

 

My question is how do I get the changed value from visualforce page to apex class variable using this html tag?

I know that if I use apex:inputtextarea it will automatically bind it to the desired apex class variable but how to work on simple html tags.

 

 

Regards,

Lakshman