• Aman
  • NEWBIE
  • 25 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 11
    Replies

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!

 

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.

 

  • October 24, 2011
  • Like
  • 0

 

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?

  • July 19, 2011
  • Like
  • 0

 

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.

  • July 13, 2011
  • Like
  • 0

 

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.

 

  • June 28, 2011
  • Like
  • 0

 

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.....

 





  • June 23, 2011
  • Like
  • 0

 

Can we create a visual force page through Apex.

If yes, help me.

  • June 17, 2011
  • Like
  • 0

 

 

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.

  • June 03, 2011
  • Like
  • 0

<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.

  • June 03, 2011
  • Like
  • 0

 

I have a VF page:-- 

 

 

<apex:page controller="testdatatable" >
<!-- Combo-handled YUI JS files: -->
<html>
<head>
<title> Yui Data Table with Visual Force Page </title>
</head>
<body>
<div id="basic"></div> 
</body>
<script>
function Init()
{
addTable();
return true;
}
YAHOO.util.Event.onDOMReady(Init);
</script>
<script >
function addTable()
{
var sectionsArr= new Array();
    <apex:repeat value="{!acc}" var="a">
     var sections=new Array();
   sections.push('{!a.id}');
    sections.push('{!a.name}'); 
    sections.push('{!a.website}');
     sectionsArr.push(sections);
  </apex:repeat>
          var myColumnDefs = [          {key:"id", sortable:true, resizeable:true},      {key:"Name", sortable:true, resizeable:true}
                                        {key:"Website", sortable:true, resizeable:true}
                             ];
                             
         var sectionsArr= new Array();
        var myDataSource= new YAHOO.util.DataSource(sectionsArr);
        myDataSource.responseType=YAHOO.util.DataSource.TYPE_JSARRAY;
        myDataSource.responseSchema={fields:["id","name", "website"]};
        var myDataTable= new Yahoo.widget.DataTable("basic", myColumnDefs, myDataSource, {caption:"My Salesforce Data"});
              }
</script>
</html>
</apex:page>

 

  • April 14, 2011
  • Like
  • 0

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...

 

  • March 21, 2011
  • Like
  • 0

 

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...

  • March 11, 2011
  • Like
  • 0

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 ...

 

 

  • March 11, 2011
  • Like
  • 0

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:

 

 

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!

 

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.

 

  • October 24, 2011
  • Like
  • 0

 

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.....

 





  • June 23, 2011
  • Like
  • 0

 

Can we create a visual force page through Apex.

If yes, help me.

  • June 17, 2011
  • Like
  • 0

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

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...

 

  • March 21, 2011
  • Like
  • 0