• Subham
  • NEWBIE
  • 75 Points
  • Member since 2011
  • Salesforce lead Developer
  • Amazon


  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 25
    Questions
  • 29
    Replies
How can I enable Person Accounts on my Salesforce Developer Edition? According to some research I found out that It can be enable by creating a case but unfortunately I am unable to create case from my developer account.

I tried contacting the Salesforce support but they were saying they can't do any help on this and I only need to post a question here and their developers can enable Person Accounts on my Org.

​Please help me on this. Thanks
controller:
public class ProjectScenario {
    // To display the list of AQ_LineItem__cS
    public list<AQ_LineItem__c>AQ_lineItemList {set;get;}
    //To get the current opportunityId.
    public Id AQId {set;get;}
    // To get the record Id which is editing in visualforcePage.
    public String rId{get;set;}
    public AQ_LineItem__c  Obj_AQLineItem = new AQ_LineItem__c();
    public AQ_LineItem__c  Obj_AQLineItem1 = new AQ_LineItem__c();
    public ProjectScenario(apexpages.StandardController controller){
        AQId = controller.getId();
        system.debug('AQId===>'+AQId);
        AQ_lineItemList =[select id,PictureUrl__c,Name,AQ_Quantity__c,AQ_NetPrice__c,AQ_SellPrice__c,
                          (select id,Name,AQ_Quantity__c,AQ_NetPrice__c,AQ_SellPrice__c from AQ_SubLineItems__r)
                          from AQ_LineItem__c where Project__c=:AQId];
        system.debug('AQ_lineItemList project'+AQ_lineItemList);
    }
    public void CalculateTotal(){
        Obj_AQLineItem = [select id,AQ_Quantity__c,AQ_NetPrice__c,AQ_SellPrice__c from AQ_LineItem__c  where id =:rId];
        system.debug('Obj_AQLineItem===>'+Obj_AQLineItem.AQ_Quantity__c);
        Obj_AQLineItem1=[select id,AQ_Quantity__c,AQ_NetPrice__c,AQ_SellPrice__c from AQ_LineItem__c where id=:Obj_AQLineItem.Id];
        system.debug('Obj_AQLineItem1===>'+Obj_AQLineItem1.AQ_Quantity__c);
        Obj_AQLineItem1.AQ_SellPrice__c=Obj_AQLineItem1.AQ_Quantity__c*Obj_AQLineItem1.AQ_NetPrice__c;
    }
}

visualforcepage:
<apex:page standardController="opportunity" extensions="ProjectScenario" id="page" sidebar="false" showHeader="false" setup="false">
    <style>
        #customers {
        font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
        border-collapse: collapse;
        width: 100%;
        }
       
        #customers td, #customers th {
        border: 1px solid #ddd;
        padding: 8px;
        }
       
        #customers tr:nth-child(even){background-color: #f2f2f2;}
       
        #customers tr:hover {background-color: #ddd;}
       
        #customers th {
        padding-top: 12px;
        padding-bottom: 12px;
        text-align: left;
        background-color: #4CAF50;
        color: white;
        }
    </style>
    <style>
        #customers1 {
        font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
        border-collapse: collapse;
        width: 100%;
        }
       
        #customers1 td, #customers th {
        border: 1px solid #ddd;
        padding: 8px;
        }
       
        #customers1 tr:nth-child(even){background-color: #f2f2f2;}
       
        #customers1 tr:hover {background-color: #ddd;}
       
        #customers1 th {
        padding-top: 12px;
        padding-bottom: 12px;
        text-align: left;
       
        }
    </style>
    <apex:form id="fm">
        <apex:pageBlock id="pb">
            <table id="customers1">
                <tr>
                    <th style="background-color: #4CAF50;">Name</th>
                    <th>{!opportunity.Name}</th>
                </tr>
                <tr>
                    <th style="background-color: #4CAF50;">Amount</th>
                </tr>
                <tr>
                    <th style="background-color: #4CAF50;">CloseDate</th>
                    <th>{!opportunity.CloseDate}</th>
                </tr>
            </table><br/><br/>
            <table id="customers">
                <tr>
                    <th>Image</th>
                    <th>Name</th>
                    <th>AQ_Quantity__c</th>
                    <th>AQ_NetPrice__c</th>
                    <th>AQ_SellPrice__c</th>
                </tr>
                <apex:repeat value="{!AQ_lineItemList}" var="r" id="pbt">
                    <tr>
                        <td><apex:image id="theImage" value="{!r.PictureUrl__c}" width="55" height="55" alt="Description of image here"/></td>
                        <td><apex:outputField value="{!r.Name}"/></td>
                        <td><apex:inputtext value="{!r.AQ_Quantity__c}">
                            <apex:actionSupport event="onchange" action="{!CalculateTotal}" reRender="pbt">
                                <apex:param name="rId" value="{!r.Id}" assignTo="{!rId}"/>
                            </apex:actionSupport>
                            </apex:inputtext></td>
                        <td><apex:outputField value="{!r.AQ_NetPrice__c}"/></td>
                        <td><apex:outputfield value="{!r.AQ_SellPrice__c}"/></td>
                    </tr>
                    <apex:repeat value="{!r.AQ_SubLineItems__r}"  var="T" id="pbt1">
                        <tr>
                            <td></td>
                            <td><apex:outputField value="{!T.Name}"/></td>
                            <td><apex:inputtext value="{!T.AQ_Quantity__c}"/></td>
                            <td><apex:outputField value="{!T.AQ_NetPrice__c}"/></td>
                            <td><apex:outputField value="{!T.AQ_SellPrice__c}"/></td>
                        </tr>
                    </apex:repeat>
                </apex:repeat>
            </table>
        </apex:pageBlock>
    </apex:form>
</apex:page>

I am not able getting onchange value in the quantity field..I am getting the value which is already in the database..but now i want to get value onchange event..

thanks..

I have created a apex controller in that I calculated

 

 

 List<PManagement__c PM=[select Rep__c,Revenue___c,Quantity___c,Month_Starting__c,Month_Ending__c from PManagement__c where id=:scon.getId()];
    }
   
public pageReference UpdatePerformance(){
   
   if(!PM.IsEmpty()){
      PManagement__c PMD= PM[0];
      list<sales__c> BS=[select SRep__c,Total_Products__c,Total_Sale_Val__c from SMB_Sales__c   where sale_date__c >=:PMD.Month_Starting__c and sale_date__c <=:PMD.Month_Ending__c AND SRep__c=:PMD.Rep__c ];
if(SMBS.size()!=0){
for(Sales__c BS1:BS){ TotalRev += BS1.Total_sale_Val__c; // I think problem is here TotalRev is incremented with null value.. TotalTar += BS1.Total_Products__c; } PMD.Revenue__c=TotalRev; PMD.Quantity__c=TotalTar; Update PMD; return null; }

 Now I am writing test case for above controller

ApexPages.StandardController stdcon=new ApexPages.StandardController(PM); 
     RevTarCon Con= new RevTarCon(stdcon);
       Con.UpdatePerformance(); // This generates error 
    }

 I Got System.NullPointerException: Argument 1 cannot be null , error in test class

How I can I solve this problem.. please help me ?

 

for(Sales__c BS1:BS){          
TotalRev += BS1.Total_sale_Val__c;
// I think problem is here TotalRev is incremented with null value.. TotalTar += BS1.Total_Products__c;
)

Hi,

 

Requirement is to get Tweets of my contact/Person account and store it in to salesforce.

Can this be achieved by authentication Twitter API using oauth 1.0
 and How.

 

It's Urgent and i would like the input from you people.Step to step guide if possible

 

Thanks,
Subham

Hi,

 

Requirement is to get Tweets of my contact/Person account and store it in to salesforce.

Can this be achieved by authentication Twitter API using oauth 1.0
 and How.

 

It's Urgent and i would like the input from you people.Step to step guide if possible

 

Thanks,
Subham

 

 

Folks,

 

I want to get data from some other API(TripIt). and store it in to salesforce custom object.

 

 

I have seen the tripit(Which stores travel plan of it's customer) api and Customer will be account in salesforce.

 

Tell me how to start. Can this be done using Oauth

 

If somebody has worked on getting data from some other API in to salesforce .Please share the code snippet or mail me at subham16@gmail.com along with the basic steps .

I know m asking too much but believe me it is very important.

 

 



Has any one worked on getting data from TripIT in to salesforce using restAPI

 

I am very new to Oauth. And My task is only to get trip details for a user.No create/delete/replace anything of that sort.

 

I created a application after signing in http://www.tripit.com/developer.
Instantly i got key and Secret which i stored in
oauth_consumer_key and consumerKey_Secret
I also stored Signature method and version and dynamically generating noonce value and timestamp.
All good till here.

Now Please check and let me know if Endpoint is correct and I need to know which method or how can i generate Oauth_token_secret and Oauth_token

Http h = new Http();
HttpRequest req = new HttpRequest();
req.setMethod('GET');
req.setEndpoint('https://api.tripit.com/oauth/request_token'); // Is this correct endpoint //1st issue???????

req.setHeader('Authorization','OAuth realm=\"https://api.tripit.com/\",oauth_consumer_key=\"'+oauth_consumer_key+'\",oauth_token=\"'+oauth_token+'\",oauth_nonce=\"'+nonceValue+'\",oauth_signature_method=\"'+oauth_signature_method+'\",oauth_timestamp=\"'+timeStamp+'\",oauth_version=\"'+oauth_version+'\",oauth_signature=\"'+signature+'\"');
// 2nd Issue Is this correct =OAuth realm=\"https://api.tripit.com/\"
//3rd and most critical from wher to get the value of oauth_token and secret?? which method or how will i get this

Regards,
Subham

Hi All,

 

I have two field on account.

One is look up to the user and other is a custom field.

 

Requirement is something like this:

When i select user A then immediately Custom field should be populated with His manager name.

This requirement is same as below.

Custom field on account can be picklist also and value withing this can come from say a custom field from user

 

Regards,

Subham

 

Hi All,

 

I have a custom object where there is a field called lastname which stores name of customer.
Some customer name have apostrophe(') which throws exception while querying
In my controller i am querying to get the value from this field as :
CustomObject__c C = [SELECT lastname__c FROM CustomObject__c ];
and storing it in my controller varible as
string myVariable  = C.lastname;

I get query exceptionas such

 

An Exception has occuredSystem.QueryException: line 1:207 mismatched character '<EOF>' expecting '''Select  LastName , from CustomObject__c Where LastName='O'Testuser' )


This happens when i try to do some operation on customer having apostrophe.

same query works fine for other customer


Please tell me how can i escape unsafe character from a generic query like the above
It's urgent

Regards,

Subham

Hi all,

 

The scenario is i want a default value say 'HELLO' to be present For <apex:inputText>

After that user can enter it's own value . so my onclick will clearthe last value 

But I  am not able to set a default value.

 

Here is the code snippet:

 

<apex:inputText  value="{!SomeValue}" onclick="clearinputtext(this);" />

 

Regards,

 

Subham

 

 

 

Hi ,

 

I want to integrate Facbook and Twitter application with my salesforce application. Can Any1 help me how to post and update status on Facbook wall and Twitter Using HTTP Request(OAuth). Is there any sample code available then please share.

 

Thanks!

Hi,

 

I need to integrate twitter with salesforce. As a inintial step I have authorized the twitter login credentials using OAuth . But  i'm clueless of how to proceed furthur. Any suggestions?

Hi,

Has anyone used Eloqua API to send emails to Contacts through code?

If yes ,  then please share the WSDL with me. I am not able to get the

"EloquaService Clietn" method from the WSDL.

 

Thanks,

Shruti

I'm a seasoned developer in SFDC but know very little about Eloqua.  I need to do an integration where an action in SFDC makes a call to Eloqua.  I've heard something about an SFDC / Eloqua interface but don't know if there is anything specific like that.  I know Eloqua has a Web Service API.  Found this on the web -- http://eloqua.blogspot.com/2009/08/getting-started-with-eloqua-web.html

 

Is the best pracitce for SFDC / Eloqua communiciation to import Eloquas WSDL to SFDC and write Apex code to call the Eloqua Web Services?

 

Any other ways to do it?

 

 

I need examples for the foll:

1) How to create Sample HelloWorld WebService using Apex?.

2) How to generate WSDL for this Sample HelloWorld WebService ?. 

3) How to consume that Sample HelloWorldWebService in VisualForce page?..

 

Any Help would be appreciated.