-
ChatterFeed
-
1Best Answers
-
0Likes Received
-
0Likes Given
-
12Questions
-
11Replies
Custom Button Code Help
I am having trouble with what I imagine to be some pretty basic Javascript. I have been struggling for days and decided I would just post and hope some kind soul will help me out :-)
Ok, so.....
I am looking to put a custom button on my Opportunity with the following methodology:
IF [Opportunity.Closed] = TRUE & [Opportunity.Dropped_Products__c] = TRUE,
Display Alert ("You will now be redirected to Product History"), Save Opportunity, and then redirect user to 'https://cs14.salesforce.com/apex/clonedrop?id={!Opportunity.Id}'
OTHERWISE
Save opportunity as usual
Any help would be GREATLY appreciated!! Thank you!
-
- LaurenP6777
- August 30, 2012
- Like
- 0
- Continue reading or reply
query BirthDate in SOQL
I have two <apex:inputText> tags on VF pages which receives Birthdate and have Jquery Datepicker.
<apex:inputText value="{!BirthDate}"/>
and
<apex:inputText value="{!BirthDateTo}"/>
When user select date in both fields.
I want to pick results through SOQL in from range.
like.
select id from object__c where dob>= birthdate and dob<=birthdateto
But the date type of dob in object is of type Text instead of Date.
Is anyone help me to how to query the data in range if i have the datatype of dob in text.
Please help me.
-
- Aman
- October 24, 2011
- Like
- 0
- Continue reading or reply
use Calendar Component
Hi,
I want to create a custom tab in which i want to show salesforce calendar only.
how i use custom component (calendar) in tabs......
How can i acheive this?
-
- Aman
- July 19, 2011
- Like
- 0
- Continue reading or reply
PickList Value acc. to record type
Hi,
I have a object i.e. (Application) with two record types name A and B.
i want to get picklist values (some field of Application object i.e Permissions) through Apex only of record type A:-
i am doing like this...
Schema.DescribeFieldResult F = Application__c.Permissions__c.getDescribe();
List<Schema.PicklistEntry> P = F.getPicklistValues();
Permissionsfields=new Set<String>();
for(Schema.PicklistEntry pp:P)
{
permissionsfields.add(String.valueOf(pp.getValue()));
}
It gives me all the picklist values of Permissions fields, if i want to get Picklist values of a particular record type, how could i get.
Please help me.
-
- Aman
- July 13, 2011
- Like
- 0
- Continue reading or reply
Reports - Problem
I have a custom object "Financial Account" which have Master Lookup to Account.
I want to create a report in which i want to display the fields of Account and their associated contacts and their associated "Financial Account" object records.
But when i go through to create a report choose report type Account & Financial Account the fields tab do not show the fields of contact.
-
- Aman
- June 28, 2011
- Like
- 0
- Continue reading or reply
String to Sobject
I have a list of type String which contains objects of Salesforce like Contact, Account, Opportunity,quote,case etc.
I want to convert the list of string in sObject to use the following line.
List<String> a=new List<String>();a.add(sObject.valueOf('Account'));
a.add('Contact');
a.add('opportunity');
a.add('Quote');
a.add('Account');
for(String x:a)
{
Map<String,sObjectField> fmap=Schema.sObjectType.x.fields.getMap();
}
// but it showing error. How i convert a string into Sobject.
the red color X is will be string from a list.....
-
- Aman
- June 23, 2011
- Like
- 0
- Continue reading or reply
-
- Aman
- June 17, 2011
- Like
- 0
- Continue reading or reply
Create CVF File on Button Click
I have a VF page which contains set of records on page and there is a button on VF named " Generated" when user click on it a CSV file will be generated with records which are on page and saved to desktop.
-
- Aman
- June 03, 2011
- Like
- 0
- Continue reading or reply
Login Error through Ajax Toolkit
<apex:page >
<html>
<head>
<title> Ajax ToolKit </title>
<script src="/soap/ajax/22.0/connection.js" type="text/javascript"></script>
<script language="JavaScript">
function check()
{
try{
var result = sforce.connection.login("a@abc.com", "password");
alert("result");
alert("you are loged in");
log("logged in with session id " + result.sessionId);
}
catch(error) {
alert("Wrong user name and password");
if (error.faultcode.indexOf("INVALID_LOGIN") != -1) {
// alert(error);
sforce.debug.log("check your username and passwd, invalid login");
} else {
sforce.debug.log(error);
}
}
}
</script>
</head>
<body>
<apex:form >
<apex:commandButton onclick="check();" value="Click"/>
</apex:form>
</body>
</html>
</apex:page>
// When I run this code it wil not respond me correctly either i entered correct credentials in mentioned red line above.
It took me at the alert message " Wrone Username and Password"
Please help me. If there is any error in my code let me.
-
- Aman
- June 03, 2011
- Like
- 0
- Continue reading or reply
how can we save data through YUI data Table to salesforce objects
I have a VF page:--
-
- Aman
- April 14, 2011
- Like
- 0
- Continue reading or reply
use custom controller with field sets
i have a custom controller "ABC"
in it i had developed a field set named "one"
i want to use this field set "one" in our vf page how can i access it...
-
- Aman
- March 21, 2011
- Like
- 0
- Continue reading or reply
not getting Id of the record through Flow
using Force.com flow, i am unable to get Id of the inserting record when record inserted through Data Update Element of the Flow Designer.
There is option in Data Update "Assign Id" and assigned it to variable.
But when i am upload our Flow to Salesforce.... it doen't show Id of the reocord but shows in Desktop(when i run our flow on desktop using Flow Designer)
Please let me...
-
- Aman
- March 11, 2011
- Like
- 0
- Continue reading or reply
how can i retreive the value from flow
i have a flow and variable in a flow, the name of the variable is LeadId.
and i embeed that flow in our vf page and now i want after completion of flow i want to retrieve the LeadId variable of flow in our controller.
How can i do it ...
-
- Aman
- March 11, 2011
- Like
- 0
- Continue reading or reply
Help updating record with HTTP Request callout from Trigger
I have a trigger that calls a class that makes an http callout. I want to update the record that invoked the trigger with a value in the response from the http callout. I'm getting a response back but need help getting it saved in the Number Stage field on the Order object. Any help would be greatly appreciated.
Here's the trigger that calls the class:
This is the class that's being called:
- John Cleveland
- September 15, 2012
- Like
- 0
- Continue reading or reply
Custom Button Code Help
I am having trouble with what I imagine to be some pretty basic Javascript. I have been struggling for days and decided I would just post and hope some kind soul will help me out :-)
Ok, so.....
I am looking to put a custom button on my Opportunity with the following methodology:
IF [Opportunity.Closed] = TRUE & [Opportunity.Dropped_Products__c] = TRUE,
Display Alert ("You will now be redirected to Product History"), Save Opportunity, and then redirect user to 'https://cs14.salesforce.com/apex/clonedrop?id={!Opportunity.Id}'
OTHERWISE
Save opportunity as usual
Any help would be GREATLY appreciated!! Thank you!
- LaurenP6777
- August 30, 2012
- Like
- 0
- Continue reading or reply
query BirthDate in SOQL
I have two <apex:inputText> tags on VF pages which receives Birthdate and have Jquery Datepicker.
<apex:inputText value="{!BirthDate}"/>
and
<apex:inputText value="{!BirthDateTo}"/>
When user select date in both fields.
I want to pick results through SOQL in from range.
like.
select id from object__c where dob>= birthdate and dob<=birthdateto
But the date type of dob in object is of type Text instead of Date.
Is anyone help me to how to query the data in range if i have the datatype of dob in text.
Please help me.
- Aman
- October 24, 2011
- Like
- 0
- Continue reading or reply
String to Sobject
I have a list of type String which contains objects of Salesforce like Contact, Account, Opportunity,quote,case etc.
I want to convert the list of string in sObject to use the following line.
List<String> a=new List<String>();a.add(sObject.valueOf('Account'));
a.add('Contact');
a.add('opportunity');
a.add('Quote');
a.add('Account');
for(String x:a)
{
Map<String,sObjectField> fmap=Schema.sObjectType.x.fields.getMap();
}
// but it showing error. How i convert a string into Sobject.
the red color X is will be string from a list.....
- Aman
- June 23, 2011
- Like
- 0
- Continue reading or reply
- Aman
- June 17, 2011
- Like
- 0
- Continue reading or reply
ListView in Apex Code or Visualforce Page
Hello,
I have a requirement where I need to display the columns seleted / defined for a particular listview in a custom visualforce page.
I know that there is a property ListView. Columns in Metadata API for Salesforce, but I am not sure on how to use it in APEX Code.
Can anyone please help me with regard to this ?? Any examples on how to use this are appreciated.
Thanks.
Kartik
- logontokartik
- May 10, 2011
- Like
- 0
- Continue reading or reply
use custom controller with field sets
i have a custom controller "ABC"
in it i had developed a field set named "one"
i want to use this field set "one" in our vf page how can i access it...
- Aman
- March 21, 2011
- Like
- 0
- Continue reading or reply