• Rishav
  • SMARTIE
  • 982 Points
  • Member since 2014
  • Salesforce Developer
  • Steadfast Technology Services

  • Chatter
    Feed
  • 29
    Best Answers
  • 2
    Likes Received
  • 11
    Likes Given
  • 30
    Questions
  • 244
    Replies
Hi All,
I am trying to add the below new currency on manage currencies in Company profiles(Setup->Comapny profiles->Manage Currencies->New).
Currency Code- SKK
Currency Name - Slovak Koruna
But I can not find the SKK - Slovak Koruna in Currency Type.
Anybody help on this to add the new currency SKK.

Thanks in Advance.
Thanks,
Chandra
 
Hello,

I am working on salesforce platform for 6 months.
I have cleared certif DEV 401 and mainly work on development part (visualforce + apex). I have also have backgroud of JAVA.

I a taking up a new opportunity in new company, so i want to increase my skills more.

I want to be know more about salesforce, majorityly admin and also imrove my development slkills a bit.
Devlopment skills cant be increased by reading. I auusme though.

can someone tell me about Study plan i should follow. I have 1.5 month, i ccan dedicate around 2 hours per day for the studying
Hi All

I am creating a lightning app for standard object Event.

The App Code is:
<aura:application >
    <h1>Event </h1>
    <CallDocument:EventForm />
</aura:application>

here CallDocument is package namespace and EventForm is Event component.

The Component code is:
<aura:component >
    <aura:attribute name="events" type="Event[]"/>
    <aura:attribute name="newEvent" type="Event" />
    <form>
        <fieldset>
            <ui:inputText aura:id="subject" label="Subject"
                          class="EventForm-control"
                          value="{!e.newEvent.Subject}"
                          required="true" />
        </fieldset>
    </form>
</aura:component>

But I am getting error.
My question is how to call standard object component in app.
Do we need to use namespace for standard object also?

thanks in advance.
@AuraEnabled
    public static List<Mandrake__Blog__c> getExpenses() {

        return [SELECT id, (select Mandrake__comment__c FROM Comments__r)
                    ,Mandrake__Contents__c
                    ,Mandrake__Group__c
                    ,Mandrake__Title__c
                FROM 
                    Mandrake__Blog__c 
                ORDER BY 
                    createdDate ASC
               ];
    }
<aura:attribute name="expense" type="Mandrake.Expense__c" />

                <div class="recordItem">
                <aura:iteration items="{!v.expense.Comments__r}" var="Comment">
                    <ui:outputText value="{!Comment.Mandrake__Comment__c}"/>
                </aura:iteration>
            </div>

Hello,

I am trying to display child records.
I have no errors but no dispaly as well.

How can i debug the issue 
  • April 21, 2015
  • Like
  • 0
What are the pros and cons when using a Workflow Rule Field Update vs. a Formula Field?
Hi Experts,

I check the Community User profile and see that the create permission is disable for Account object.
So my question is that how community user can create account when they do registration?
Hi all,

I am using Apex Repeat to get all the children objects of a parent object and print out their fields values. Apex OutputText does not respect new line characters for a Text Area field, so I had to write a split function in the controller to cut the text by line break characters.

The issue is that it goes down a new line but does not align with the previous text in the same field. So it will be like this:

1. Goals for this year: * Complete all training
* Sell more goods
* Get customer's feedback

("Sell more goods" and "get customer's feedback" should be indented to right below "Complete all training").

This is Apex Repeat's getting data and "complete all training .... feedback" is 1 field data, so I don't know how to put indentation in this scenario. Any suggesstions or help will be appreciated.
hi, i want create 2 visualforce page with a controller using custom object.In the first page i want select the one record and pass it's id to another visual force page which will show it's details using query string.
Hi folks,
          Can anyone tell me how to hide and show outpanel
My usecase is:
I have 2 output panel. In the first I have a button when I click on the button the 1st outputpanel should get hide and 2nd one get display.
and same for second output panel

For that how can i write code for visualforce page
Is ther any sample code for this usecase


Thanks in advance
Karthick
Hi folks,   
       Can anyone tell me how to create lookup field in viusalforce page using bootstrap library?
My use case is create contact record fields(LastName,AccountName and Lead Source).
For that I have created a page and it doest give the proper style for lookup field..
My VFP as follows:
 
<apex:page standardController="Contact" sidebar="false" standardStylesheets="false" showHeader="false" >
<head> 
    <title>Create New Contact</title>
    
    

    <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"/>
    
    
    <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> 
    
    

    <apex:includeScript value="{!URLFOR($Resource.js, '/js/bootstrap.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.js, '/js/bootstrap.min.js')}"/>
    
    <apex:stylesheet value="{!URLFOR($Resource.css, '/css/bootstrap.css')}"/>
    <apex:stylesheet value="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"/>
    
    
    <style type="text/css"><!-- Spacing for the Nav bar -->
      body {
        padding-top: 60px;
        padding-bottom: 40px;
      }
    </style>

    <script type="text/javascript">
        var $j = jQuery.noConflict();
    </script>
    
    
   
</head>

<body>
     <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
            <a class="brand" href="#">Bootstrap Page</a>
          <div class="nav-collapse collapse">
            <ul class="nav">
            <li><a href="#">Link 1</a></li>
            <li><a href="#">Link 2</a></li>
            </ul>
            <span class="navbar-form span3 pull-right">
                <li><a href="#">Right Link</a></li>
            </span>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>

    <div class="container">
    <apex:pageBlock >
        <apex:form >
            <h3>LastName </h3>
            <apex:inputField value="{!Contact.LastName}" styleClass="form-control"  html-placeholder="Enter Your Last Name"  /><br/>
             <h3>Account name</h3>
            <apex:inputField value="{!Contact.accountid}"   styleClass="form-control" html-placeholder="Enter Account Name"  /> <br/>
             <h3>Lead Source </h3>
            <apex:inputField value="{!contact.LeadSource}" styleClass="form-control"   /><br/>
            

            <apex:commandButton action="{!save}" styleClass="btn btn-success" value="Create New Contact" />
            
        </apex:form>
    </apex:pageBlock>
    </div> <!-- /container -->

</body>

</apex:page>

The above page gives like
User-added image


I wanna looks like
User-added image


Please help me What I've to modify code

Thanks in advance
Karthick
Hi folks,
       Can anyone tell me what is the purpose of work.com and how to use work.com?

Thanks in advance
Karthick
Hi folks,
       Can anyone tell me how to get the value of query string in Remote Method?
My code as follows
@RemoteAction
    global static Contact getContact() {
        String CID=ApexPages.currentPage().getParameters().get('id');
       
        String ContactId=CID.trim();
        
        contact c= [SELECT Id, FirstName, LastName,Phone FROM Contact WHERE Id= :ContactId];
        return c;
    }

I get the following error message while running the above code
attempt to de reference a null object


How can I fix this error?



Thanks in advance
Karthick
What is salesforce radian6  ? Any simple explanation is sufficent enought ? Also please provide the relevant link to get the documentation ?
please explain the procedure of create phonegap application..
Hi folks
          Can anyone tell me what is debugging in developer console and how to use that???


Thanks in advance
Karthick
Hi Everyone...

Iam trying to update few fields of a record which are not mandatory fields...

there are some required fields in the record....

when I click on "update" button from vf...the following error arises...

System.DmlException: Update failed. First exception on row 0 with id a0O9000000FiK6pEAF; first error: REQUIRED_FIELD_MISSING, Required fields are missing
Hi everybody,
        I want to know about flow(which means where its start and where its ends) of sales objects I mentioned below
Campaign,Lead,Account,Contact,Opportunity,Product,Quotes,orders,Contract,cases and solution..


Thanks in advance
Kathick

Hi All,

I have one JSON Data , i am serializing that data, but it is becoming NULL after deserialization.
I want to access the value form JSON data into the VF page. 

Here is my JSON Data: 

{  
   "mindTouchPage":{  
      "id":"1",
      "guid":"00000000000000000000000000000000",
      "draftstate":"inactive",
      "href":"https://steadfast-prod.mindtouch.us/@api/deki/pages/1?redirects=0",
      "deleted":"false",
      "datecreated":"Fri, 10 Jun 2016 20:30:17 GMT",
      "language":"en-US",
      "namespace":"main",
      "path":{  
         "seo":"true",
         "type1":"fixed",
         "text":""
      },
 
          
                        "subpages":{  
                           "mindTouchPage":[  
                              {  
                                 "id":"288",
                                 "guid":"a7afffb2634b453485bff59faed455f6",
                                 "draftstate":"inactive",
                                 "href":"https://steadfast-prod.mindtouch.us/@api/deki/pages/288?redirects=0",
                                 "deleted":"false",
                                 "datecreated":"Fri, 10 Jun 2016 21:33:04 GMT",
                                 "language":"en-US",
                                 "namespace":"main",
                                 "path":{  
                                    "seo":"true",
                                    "type1":"custom",
                                    "text":"The_MindTouch_Workbook/Chapter_I_-_Understand_users_&_groups/010_User_types_defined"
                                 },
                                 "subpages":"",
                                 "title":"1. User types defined",
                                 "uriui":"https://steadfast-prod.mindtouch.us/?title=The_MindTouch_Workbook/Chapter_I_-_Understand_users_%26_groups/010_User_types_defined"
                              },
                              {  
                                 "id":"289",
                                 "guid":"88eae1c3ae25449eb27a518bfabf51ae",
                                 "draftstate":"inactive",
                                 "href":"https://steadfast-prod.mindtouch.us/@api/deki/pages/289?redirects=0",
                                 "deleted":"false",
                                 "datecreated":"Fri, 10 Jun 2016 21:33:09 GMT",
                                 "language":"en-US",
                                 "namespace":"main",
                                 "path":{  
                                    "seo":"true",
                                    "type1":"custom",
                                    "text":"The_MindTouch_Workbook/Chapter_I_-_Understand_users_&_groups/011_Create_groups"
                                 },
                                 "subpages":"",
                                 "title":"2.  Create groups",
                                 "uriui":"https://steadfast-prod.mindtouch.us/?title=The_MindTouch_Workbook/Chapter_I_-_Understand_users_%26_groups/011_Create_groups"
                              },
                              {  
                                 "id":"290",
                                 "guid":"e6da4dab743846f3bef6cd2826964937",
                                 "draftstate":"inactive",
                                 "href":"https://steadfast-prod.mindtouch.us/@api/deki/pages/290?redirects=0",
                                 "deleted":"false",
                                 "datecreated":"Fri, 10 Jun 2016 21:33:20 GMT",
                                 "language":"en-US",
                                 "namespace":"main",
                                 "path":{  
                                    "seo":"true",
                                    "type1":"custom",
                                    "text":"The_MindTouch_Workbook/Chapter_I_-_Understand_users_&_groups/012_Create_users"
                                 },
                                 "subpages":"",
                                 "title":"3.  Create users",
                                 "uriui":"https://steadfast-prod.mindtouch.us/?title=The_MindTouch_Workbook/Chapter_I_-_Understand_users_%26_groups/012_Create_users"
                              }
                           ]
                        }

       }
	   
	}

Here is My Wrapper Class
public class JSON2Apex {
    public list<MindTouchPage> mindTouchData;
    public list<path> pathData;

	public class Path {
		public String seo;
		public String type1;
		public String text;
	}

	public class MindTouchPage {
		public String id;
		public String guid;
		public String draftstate;
		public String href;
		public String deleted;
		public String datecreated;
		public String language;
		public String namespace;
		public Path path;
		public Subpages subpages;
		public String title;
		public String uriui;
	}

	public class Subpages {
		public List<MindTouchPage> mindTouchPage;
	}

	public static JSON2Apex parse(String json) {
		return (JSON2Apex) System.JSON.deserialize(json, JSON2Apex.class);
	}
}

controller class
global with sharing class ViptelaCustLandingController {
    
   global static String responseData{get;set;}
    
   global static String status{get;set;}
   public boolean isUserAuthenticated{get;set;}
   Public Integer closeCaseCount{get;set;}
   public Integer openCaseCount{get;set;} 
   public JSON2Apex mindTouch{get;set;}
   
    public MindTouchDataWrapper wrapper {
        get;
        set;
    }
    
    // Constructor
    public ViptelaCustLandingController(){
     // Get the count of closed Cases
     closeCaseCount = [SELECT COUNT() FROM CASE WHERE status = 'closed'];
     openCaseCount = [SELECT COUNT() FROM CASE WHERE status !='closed'];  
    }
    
    // Code will invoke on pageLoad
    public pageReference redirectToCustomAuthPage(){
        if(UserInfo.getUserType()=='Guest'){
            return new pagereference ('/viptelaLoginController');
        }
        else{
            // status = 'User Authenticated';
            // Call the webService Function
           // getDataFromMindTouch();
             isUserAuthenticated = TRUE;
             getDataFromMindTouch();
                     
             return null;
        }
    }

    // WebService Method to Call the "MindTouch" API
  //  @future(callout = true)
        public void getDataFromMindTouch(){
            status = 'method Called';
            System.debug('WebService Method Called');
            // MindTouch User Name
            String userName = '**********';
            String password = '***********';
            String mindTouchURL = 'https://***************';
            
            
            //  Prepare the HTTP request and response
            HttpRequest req = new HttpRequest();
            HttpResponse res = new HttpResponse();
            Http http = new Http();
            
            // Construct Authorization and Content Header
           // Blob headerValue = Blob.valueOf(userName+':'+password);
              Blob headerValue = Blob.valueOf(username + ':' + password);
              String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
            
           // String authorizationHeader = 'Basic'+ EncodingUtil.base64Encode(headerValue);
           // req.setHeader('Authorization', 'Basic UmlzaGF2OlJpc2hAMTk5MSo=');
            req.setHeader('Authorization', authorizationHeader);
            req.setHeader('Content-Type','application/json');
            
            // Set Method,endpoint,and body
            req.setMethod('GET');
            req.setEndpoint(mindTouchURL);
            
            try{
                res = http.send(req);
                System.debug('Response is =======' + res.getBody());
                //responseData = res.toString();
                responseData =res.getBody();
                status = 'TRUE';
                System.debug('response data variable value is' +responseData );
                
                //**************************Added by V******************************************
                
                //To overcome the limitation of @ variable in response, it is converted to the SFDC acceptable form using replace keywork
                //and same is reference in the MindTouchWrapper Class
                responseData = responseData.replace('"page"', '"mindTouchPage"');
                responseData = responseData.replace('"@id":', '"id":');
                responseData = responseData.replace('"@guid":', '"guid":');
                responseData = responseData.replace('"@draft.state":', '"draftstate":');
                responseData = responseData.replace('"@href":', '"href":');
                responseData = responseData.replace('"@deleted":', '"deleted":');
                responseData = responseData.replace('"date.created":', '"datecreated":');
                responseData = responseData.replace('"@seo":', '"seo":');
                responseData = responseData.replace('"@type":', '"type1":');
                responseData = responseData.replace('"#text":', '"text":');
                responseData = responseData.replace('"uri.ui":', '"uriui":');
                
                System.debug('response2 data variable value is' +responseData);
                
                //Parse is the deserialize method in the MindTouchWrapper class
               // MindTouchWrapper mindTouch = MindTouchWrapper.parse(responseData); 
                  mindTouch = JSON2Apex.parse(responseData);
                
                System.debug('Deserialized data is '+mindTouch);
                
                 //*************************Added by V*******************************************
           
            }Catch(System.CalloutException e){
                System.debug('ERROR' +e);
                System.debug('Response is ' + res.getBody());
                 
            }
        }
  
}

VF Code to get Data
<apex:pageBlock >
                    <apex:pageBlockSection columns="2">
                         <apex:repeat value="{!mindTouch}" var="data">
                                  <apex:outputText value="{!data.id}"></apex:outputText>
                        </apex:repeat>  
                   </apex:pageBlockSection>
               </apex:pageBlock>

Please hlep me to show data from JSON into VF page.
 
Hii All,
why my developer console is not working ?
First this problem was with ap2 instance but now it's started happening with AP1 instance too.

When i click on devleoper console it prompt to open in new window but after opening it minimized and after that it become irresponsive so atlast browser give the option to kill the pages.

Any help will be appreciated.

Thanks
Rishav
  • April 09, 2015
  • Like
  • 0
Hii, 
I was just trying to learn some aura comonent, while trying with aura:iteration to take dynamic value it's not working
<aura:component>
  <aura:attribute name="expenses" type="rishav.Expense__c[]"/> 
   <div class="row">
       <aura:iteration items="{!v.expenses}" var="expense"> 
           <p>{!expense.Name}, {!expense.rishav__Client__c}, {!expense.rishav__Amount__c},
               {!expense.rishav__Date__c}, {!expense.rishav__Reimbursed__c}
           </p> 
       </aura:iteration>
    </div>
</aura:component>
I am not getting where i am doing mistake , but it is not showing any record even after some records are there in my database.
Can anyone tell me where i am doing mistake.
 
Thanks
Rishav
  • April 01, 2015
  • Like
  • 0
Hii,
 I am Writing a test class for  cotroller but it is not getting  pass , it is always throwing error in the controller part as"DML Exception".
This is my extension class 
 
public CPCommAttachCls(ApexPages.StandardController stdController) {
        
        objId = ApexPages.currentPage().getParameters().get('CaseID');
        objCaseRec = [select CaseNumber, Subject from case where case.id =: objId];
        caseNumber = objCaseRec.CaseNumber;
        subject = objCaseRec.Subject;
       
       // initializing caseComment
       comment = new CaseComment();
       comment.parentid=objid;
        
      // initializing the variable for Attachment process
      CaseAttachment = new Attachment(); 
      CaseAttachment.parentId=objid; 
        
    }      // Controller scope finished

And this is my test class for passing the controller
@isTest(SeeAllData=true)
public class CPCommAttachTestCls {
    public static TestMethod void Testclass()
    {  
    //  CaseComment comment = new CaseComment();
      Case c = Cse();
      ApexPages.StandardController sc = new ApexPages.StandardController(c);
      CpCommAttachCls ContCls = new CpCommAttachCls(sc); // This line giving error
      
        
    }
    static Case cse(){
    Case c = new Case();
    c.subject = 'LogMeIn Pro2';
    c.Description='Test Description';
    c.General_App_Area__c='A';
    c.Priority='High';
    c.Status='New';
    insert c;
    return c;
}

}

I am using the standard controller case. But it is giving me error.
  • October 25, 2014
  • Like
  • 0
Hii,
     I want to build one visualforce page for showing the list of article in the visualforce page. I want to use <KnowledgeArticleList> component for getting the list of article and want to show the "VIEWStat" image and "VotesTat" image with every article in the list. 
I want to implement this functionality with standard component.
Any suggestion please !

Thanks 
Rishav Kumar
  • October 21, 2014
  • Like
  • 0
HI all,
            i am trying to show all the "CATEGORY"  values from the knowledge base in the visualforce pages.
           But i am not getting any field so calles category so that i can fetch it using query. 
           If anyone having idea then please tell me.


Thanks
Rishav
  • September 25, 2014
  • Like
  • 0
Hi,
      I am trying to use jqTree with visualforce page for creating the tree list view. But i am not getting anything, i tested my jQuery it's working.
    Here is my code please tell me what mistakes  i doing
<apex:page standardStylesheets="false" showHeader="false">
  <apex:includeScript value="{!$Resource.jqTree}"/>
  <apex:includeScript value="{!$Resource.jquery}"/>
  <apex:includeScript value="{!$Resource.jqTreeCss}"/>
  <apex:includeScript value="{!$Resource.jqTreeData}"/>
    <script>
     $j = jQuery.noConflict();
     var data = [
    {
        label: 'node1',
        children: [
            { label: 'child1' },
            { label: 'child2' }
        ]
    },
    {
        label: 'node2',
        children: [
            { label: 'child3' }
        ]
    }
];
   $j(document).ready(function(){
  
  
  
     
   $j("[id$=tree1]").tree({
        data: data
    });
   });
  </script>
  
  <div id="tree1">
  hii
  </div>
</apex:page>
I tried with static JSON resources also but not working.
Can anyone tell me what mistakes i am doing here.

Thanks
Rishav
  • September 24, 2014
  • Like
  • 0
Hi, 
 I am trying to access the community through mobile SDK.
i have modified the server.xml file and now it look like this:
<xml version="1.0" encoding="utf-8"?>
<servers>
  <server name="Sandbox" url="https://test.salesforce.com"/>  
  <server name="production" url="https://rishav-developer-edition-na15.force.com"></server>
 </servers>


But now i am getting the error like this. First thing i am  not able to understand why it is appending the parameter at the time of loading the page in web view.

Is there anything that i need to do in configuration. Or i am doing some mistakes. 
If anybody have already have done this then please help me.

Thanks
Rishav
  • September 17, 2014
  • Like
  • 0
 Hi all,
            i want to make one mobile app for community user.
          Is it possible to fetch the data using the REST API for community user? I don't want to use force.com site, i just want to give access of data using the REST              API to the community user. 
         so tell me is it possible or not?

Thanks 
Rishav
  • September 11, 2014
  • Like
  • 0
Hello everyone,
                              i have one requirement and it is  ,  Customer want to use the customer portal or knowledge by using the android application.
  
            Now in this scenario i want to use the OAUTH with the android application.
  My question is that , can a customer portal user, knowledge user login into the salesforce by using "login.salesforce.com/OAUTH2 via android application ?
    I think it is not possible  for customer portal license user to enter into the system by using the "login.salesforce.com/OAUTH2"
   now my second scenario is that if the first one is not possible then i have second question and that is 
   can a customer portal user can login into the system by using the community.FORCE.COM URL that is created after creation of community with the help of   OAUTH ?

Thanks
Rishav
  • September 04, 2014
  • Like
  • 0

Hii,
        I have just started to study the salesforce mobile SDK API . I am trying to find out  what exact method we use for "LOGIN" into the salesforce but i am not gettiing it . 
If anyone have implementd the salesforce SDK then please tell me what exact method we are using for login in that API or it will be more good if someone give me the login Module for using in android .

Thanks
Rishav Kumar

  • August 26, 2014
  • Like
  • 0
Hello everyone,
                             Can i access the visualforce pages if i develop an android application with the help of salesforce mobile SDK?
                    

If yes then pelase give me some link where  i can learn .
If no then why, What is the reason?



Rishav









  • August 24, 2014
  • Like
  • 0
Hello buddies,
                         I am trying to use PKB package (worked as knowledge base), but  i am facing the problem while using it.
                      I am unable to see the attachment related with the article in the article detail page in the mobile browser.

                      If anybody have  used this PKB then please reply ASAP.


Thanks
Rishav Kumar
 
                                
  • August 23, 2014
  • Like
  • 0
Hi , 
  I am having problem in accessing the id of the element using jQuery, what is the accurate method to access the interna or nested elements 
 in the visualforce using jQuery.
<script>
   $(document).ready(function(){
  

  $("#createUserLink").click(function() {
  
  alert('hello');
  
  });
   });
   
   </script>
   
</head>
<apex:form id="popupForm">
<div id="lean_overlay">
<table>
<tr>
<td><apex:outputLabel value="Enter customer name:"></apex:outputLabel></td>
<td> <apex:inputtext value="{!cust_name}"/> </td>
</tr>
<tr>
<td><apex:outputLabel value="Enter customer contact number:"></apex:outputLabel></td>
<td><apex:inputText value="{!cust_contact}"/> </td>
</tr>
<tr>
<td><apex:outputLabel value="Enter customer email"></apex:outputLabel></td>
<td><apex:inputText value="{!cust_email}"/></td>
</tr>
<tr>
<td><apex:outputLabel value="Enter customer's address"></apex:outputLabel> </td>
<td><apex:inputText value="{!cust_address}"/></td>
</tr>
<tr><td><apex:commandButton value="submit" id="submitButton"/> </td> 
<td><apex:commandButton value="Cancel" id="cancelButton"/></td>
</tr>
</table>

</div>
<a href="#" id="createUserLink">Create User </a>   // This element not accessible
</apex:form>

<a href="#" id="createUserLink">Create User </a>   // same element working fine 

</apex:page>
what is the exact  way to access the id of nested element.
  • August 19, 2014
  • Like
  • 0
Can  we replicate the full knowledge functionality like searching article,rating article,sort by relevance, creating one new article, publish the article  by usign the standard way means without writing the code for that.
As i am thinking it is not possible but if there is any way to replicate the functionality without writing the code then please let me know.
  • August 14, 2014
  • Like
  • 0
Hello Everyone,
                           I have one requirement to implement SSO in community. I have plan to build community(partner portal, customer portal) in that i want to implement 
                          SSO. Now scenario is that i am having one website and from that website i want to transfer the user into community portal on click of a single link.
                         I went through the SSO implementation document but i am not clear with this so please anyone can tell me that how can implement this scenario.

Thanks
Rishav
  • August 12, 2014
  • Like
  • 0
Hi,
 I am frequently getting this error while using the data loader from command prompt.

[7/11/2014 7:00:06 PM] Justin: 2014-07-03 18:09:42,189 FATAL [main] process.ProcessRunner topLevelError (ProcessRunner.java:238) - Unable to run process insertCustomerCodeUsage
java.lang.RuntimeException: com.sforce.ws.ConnectionException: Failed to send request to https://cs13.salesforce.com/services/Soap/u/30.

please if anyone know about this then help me ASAP.

Thnaks
Rishav
Hii,
can anyone tell me how to migrate the data from SQL server and Apache server to the salesforce.
I want to move my data from the web server to the salesforce  on daily basis. 
please suggest me all possible and best way to do this task.


Rishav
What can be the possible reason of recordsetvar not working. In my one developer edition recordsetvar is working and in second developer org  RECORDSETVAR  is not working .
So if anyone know the reason then tell me please.
I have one scenario and that is,
 i have to use the single pagination functionality with multiple records .
IN my vf page i have some static data on that time pagination should work with that static data but  in the same page there is again  i have implemented the search functionality and there is a search button so after clicking on search button some records  will come , so now my same pagination functionality should work with the search record also. It means pagination functoinality should switching the data  source according to the situation.
 
i tried but not success . any suggestion or idea if you people have then give me.
What can be the possible reason of recordsetvar not working. In my one developer edition recordsetvar is working and in second developer org  RECORDSETVAR  is not working .
So if anyone know the reason then tell me please.

Hi All,

I have one JSON Data , i am serializing that data, but it is becoming NULL after deserialization.
I want to access the value form JSON data into the VF page. 

Here is my JSON Data: 

{  
   "mindTouchPage":{  
      "id":"1",
      "guid":"00000000000000000000000000000000",
      "draftstate":"inactive",
      "href":"https://steadfast-prod.mindtouch.us/@api/deki/pages/1?redirects=0",
      "deleted":"false",
      "datecreated":"Fri, 10 Jun 2016 20:30:17 GMT",
      "language":"en-US",
      "namespace":"main",
      "path":{  
         "seo":"true",
         "type1":"fixed",
         "text":""
      },
 
          
                        "subpages":{  
                           "mindTouchPage":[  
                              {  
                                 "id":"288",
                                 "guid":"a7afffb2634b453485bff59faed455f6",
                                 "draftstate":"inactive",
                                 "href":"https://steadfast-prod.mindtouch.us/@api/deki/pages/288?redirects=0",
                                 "deleted":"false",
                                 "datecreated":"Fri, 10 Jun 2016 21:33:04 GMT",
                                 "language":"en-US",
                                 "namespace":"main",
                                 "path":{  
                                    "seo":"true",
                                    "type1":"custom",
                                    "text":"The_MindTouch_Workbook/Chapter_I_-_Understand_users_&_groups/010_User_types_defined"
                                 },
                                 "subpages":"",
                                 "title":"1. User types defined",
                                 "uriui":"https://steadfast-prod.mindtouch.us/?title=The_MindTouch_Workbook/Chapter_I_-_Understand_users_%26_groups/010_User_types_defined"
                              },
                              {  
                                 "id":"289",
                                 "guid":"88eae1c3ae25449eb27a518bfabf51ae",
                                 "draftstate":"inactive",
                                 "href":"https://steadfast-prod.mindtouch.us/@api/deki/pages/289?redirects=0",
                                 "deleted":"false",
                                 "datecreated":"Fri, 10 Jun 2016 21:33:09 GMT",
                                 "language":"en-US",
                                 "namespace":"main",
                                 "path":{  
                                    "seo":"true",
                                    "type1":"custom",
                                    "text":"The_MindTouch_Workbook/Chapter_I_-_Understand_users_&_groups/011_Create_groups"
                                 },
                                 "subpages":"",
                                 "title":"2.  Create groups",
                                 "uriui":"https://steadfast-prod.mindtouch.us/?title=The_MindTouch_Workbook/Chapter_I_-_Understand_users_%26_groups/011_Create_groups"
                              },
                              {  
                                 "id":"290",
                                 "guid":"e6da4dab743846f3bef6cd2826964937",
                                 "draftstate":"inactive",
                                 "href":"https://steadfast-prod.mindtouch.us/@api/deki/pages/290?redirects=0",
                                 "deleted":"false",
                                 "datecreated":"Fri, 10 Jun 2016 21:33:20 GMT",
                                 "language":"en-US",
                                 "namespace":"main",
                                 "path":{  
                                    "seo":"true",
                                    "type1":"custom",
                                    "text":"The_MindTouch_Workbook/Chapter_I_-_Understand_users_&_groups/012_Create_users"
                                 },
                                 "subpages":"",
                                 "title":"3.  Create users",
                                 "uriui":"https://steadfast-prod.mindtouch.us/?title=The_MindTouch_Workbook/Chapter_I_-_Understand_users_%26_groups/012_Create_users"
                              }
                           ]
                        }

       }
	   
	}

Here is My Wrapper Class
public class JSON2Apex {
    public list<MindTouchPage> mindTouchData;
    public list<path> pathData;

	public class Path {
		public String seo;
		public String type1;
		public String text;
	}

	public class MindTouchPage {
		public String id;
		public String guid;
		public String draftstate;
		public String href;
		public String deleted;
		public String datecreated;
		public String language;
		public String namespace;
		public Path path;
		public Subpages subpages;
		public String title;
		public String uriui;
	}

	public class Subpages {
		public List<MindTouchPage> mindTouchPage;
	}

	public static JSON2Apex parse(String json) {
		return (JSON2Apex) System.JSON.deserialize(json, JSON2Apex.class);
	}
}

controller class
global with sharing class ViptelaCustLandingController {
    
   global static String responseData{get;set;}
    
   global static String status{get;set;}
   public boolean isUserAuthenticated{get;set;}
   Public Integer closeCaseCount{get;set;}
   public Integer openCaseCount{get;set;} 
   public JSON2Apex mindTouch{get;set;}
   
    public MindTouchDataWrapper wrapper {
        get;
        set;
    }
    
    // Constructor
    public ViptelaCustLandingController(){
     // Get the count of closed Cases
     closeCaseCount = [SELECT COUNT() FROM CASE WHERE status = 'closed'];
     openCaseCount = [SELECT COUNT() FROM CASE WHERE status !='closed'];  
    }
    
    // Code will invoke on pageLoad
    public pageReference redirectToCustomAuthPage(){
        if(UserInfo.getUserType()=='Guest'){
            return new pagereference ('/viptelaLoginController');
        }
        else{
            // status = 'User Authenticated';
            // Call the webService Function
           // getDataFromMindTouch();
             isUserAuthenticated = TRUE;
             getDataFromMindTouch();
                     
             return null;
        }
    }

    // WebService Method to Call the "MindTouch" API
  //  @future(callout = true)
        public void getDataFromMindTouch(){
            status = 'method Called';
            System.debug('WebService Method Called');
            // MindTouch User Name
            String userName = '**********';
            String password = '***********';
            String mindTouchURL = 'https://***************';
            
            
            //  Prepare the HTTP request and response
            HttpRequest req = new HttpRequest();
            HttpResponse res = new HttpResponse();
            Http http = new Http();
            
            // Construct Authorization and Content Header
           // Blob headerValue = Blob.valueOf(userName+':'+password);
              Blob headerValue = Blob.valueOf(username + ':' + password);
              String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
            
           // String authorizationHeader = 'Basic'+ EncodingUtil.base64Encode(headerValue);
           // req.setHeader('Authorization', 'Basic UmlzaGF2OlJpc2hAMTk5MSo=');
            req.setHeader('Authorization', authorizationHeader);
            req.setHeader('Content-Type','application/json');
            
            // Set Method,endpoint,and body
            req.setMethod('GET');
            req.setEndpoint(mindTouchURL);
            
            try{
                res = http.send(req);
                System.debug('Response is =======' + res.getBody());
                //responseData = res.toString();
                responseData =res.getBody();
                status = 'TRUE';
                System.debug('response data variable value is' +responseData );
                
                //**************************Added by V******************************************
                
                //To overcome the limitation of @ variable in response, it is converted to the SFDC acceptable form using replace keywork
                //and same is reference in the MindTouchWrapper Class
                responseData = responseData.replace('"page"', '"mindTouchPage"');
                responseData = responseData.replace('"@id":', '"id":');
                responseData = responseData.replace('"@guid":', '"guid":');
                responseData = responseData.replace('"@draft.state":', '"draftstate":');
                responseData = responseData.replace('"@href":', '"href":');
                responseData = responseData.replace('"@deleted":', '"deleted":');
                responseData = responseData.replace('"date.created":', '"datecreated":');
                responseData = responseData.replace('"@seo":', '"seo":');
                responseData = responseData.replace('"@type":', '"type1":');
                responseData = responseData.replace('"#text":', '"text":');
                responseData = responseData.replace('"uri.ui":', '"uriui":');
                
                System.debug('response2 data variable value is' +responseData);
                
                //Parse is the deserialize method in the MindTouchWrapper class
               // MindTouchWrapper mindTouch = MindTouchWrapper.parse(responseData); 
                  mindTouch = JSON2Apex.parse(responseData);
                
                System.debug('Deserialized data is '+mindTouch);
                
                 //*************************Added by V*******************************************
           
            }Catch(System.CalloutException e){
                System.debug('ERROR' +e);
                System.debug('Response is ' + res.getBody());
                 
            }
        }
  
}

VF Code to get Data
<apex:pageBlock >
                    <apex:pageBlockSection columns="2">
                         <apex:repeat value="{!mindTouch}" var="data">
                                  <apex:outputText value="{!data.id}"></apex:outputText>
                        </apex:repeat>  
                   </apex:pageBlockSection>
               </apex:pageBlock>

Please hlep me to show data from JSON into VF page.
 
hi,
Wil u help me what is MD5 alogorithm how it is implimented in salesforce why we have to go for that algorithm...
Hi,

I'm creating a Lightning component, and to farmiliarize myself with the process I followed the Salesforce Lightning component creation tutorial (https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_one_demo_load.htm). I followed the tutorial to the letter, and everything works fine until either of the .cmp files (one for contacts, one for contactList) change at all from the tutorial version. And I mean literally any change breaks the component. I'll open the component view on the Salesforce1 app, contacts are retrieved and listed properly, and then I make a change to contactList.cmp or contacts.cmp, be it a comment, a newline, anything, and the conacts won't load. For instance, editing a pre-existing comment in contactList.cmp like "<!-- Display the edit record page when the icon is clicked -->" and changing it to "<!-- Display the edit record page when an icon is clicked -->" breaks the entire component. No errors are thrown, but once contactList.cmp is saved the list is never displayed. I've tried relaunching the app and restarting the phone, both to no avail.
This problem has me banging my head against the wall. It's bizaree that a change in a comment could break the enitre componet. Is there some compile step I'm missing or something? Why would any change break functionality?

Thanks!
Hi All,

I have 3 picklist fields f1,f2,f3 which are dependent pciklist. f2 is dependent on f1 and f3 is dependent on f2. I want to display these 3 fields in a vf page.

Can anyone please share me some code.

Regards
Hi All,
I am trying to add the below new currency on manage currencies in Company profiles(Setup->Comapny profiles->Manage Currencies->New).
Currency Code- SKK
Currency Name - Slovak Koruna
But I can not find the SKK - Slovak Koruna in Currency Type.
Anybody help on this to add the new currency SKK.

Thanks in Advance.
Thanks,
Chandra
 
We are using third party web service in salesforce but our third party instance has self-signed certificate. I need to call soap web service of third party.
But when I am trying to call web service at that time I am receiving  below error
System.CalloutException: IO Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Please Provide me way to by pass this error.
Hello,

I am working on salesforce platform for 6 months.
I have cleared certif DEV 401 and mainly work on development part (visualforce + apex). I have also have backgroud of JAVA.

I a taking up a new opportunity in new company, so i want to increase my skills more.

I want to be know more about salesforce, majorityly admin and also imrove my development slkills a bit.
Devlopment skills cant be increased by reading. I auusme though.

can someone tell me about Study plan i should follow. I have 1.5 month, i ccan dedicate around 2 hours per day for the studying
We need to develop Message board like http://www.codeproject.com/ [^]
User can add article by selecting Category->sub-forums and then topics and other user can add post on it.
Hi All,

I have created Email Services to create case through email.

Issue I am facing is, from most of case's FRom address is coming right and for few Cases From Address coming as "noreply@salesforce.com"and From Name as "Salesforce Email Processor".

I also did setting for "noreply@salesforce.com" in Email Administration ---> Deliverability ---->Email Security Compliance ----> Enable Sender ID compliance ( checkbox = false ).

Please help to resolve this issue
I have created an custom component and I am integrate it with Lightning app builder but not able to add dynamic picklist values on app builder page for that component.
I have created a lightning app with a text box and list of contacts under it.As user types in the search string,List contents should be filtered.But I am receiving following error upon typing the search string-rerender threw an error in 'markup://aura:iteration' : Cannot read property 'childNodes' of null.I came across-"http://salesforce.stackexchange.com/questions/71604/lightning-bug-in-lightning-framework-when-using-aurarenderif" but not sure if it is the same reason for this behavior.Could anyone point out the error in my below code.

Component to display list of filtered contacts-ContactItemList.cmp
<aura:component controller="ContactItemListController" >
    <ltng:require styles="/resource/EquinixBootstrap/equinixbootstrap.css" scripts="/resource/Bootstrapjs/bootstrap.min.js" />    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />   
    <aura:handler event="c:PFAppEvent" action="{!c.doInit}"/>	
    <aura:attribute name="contacts" type="Contact[]"/>    
    
	<aura:iteration items="{!v.contacts}" var="p">
        <c:ContactItem fullName="{!p.Name}" accountName="{!p.Account.Name}" />        
    </aura:iteration> 
</aura:component>
Component to type in the search string-SearchComponent.cmp
<aura:component >
    <ltng:require styles="/resource/EquinixBootstrap/equinixbootstrap.css" scripts="/resource/Bootstrapjs/bootstrap.min.js,/resource/jQuery/jquery-1.11.3.min.js" afterScriptsLoaded="{!c.loadJQuery}"/>    
    <aura:registerEvent name="PFAppEvent" type="c:PFAppEvent"/>
    
    <input type="text" style="width:100%;" class="form-control" placeholder="Name or Username" id="searchBox" />
</aura:component>
Helper method to call Server Side controller and fetch matching contacts-ContactItemListHelper.js
({
 	getContacts: function(component,event) {
      
        var action = component.get("c.getContacts");
        var searchString;
        if(typeof event != 'undefined'){
   			searchString=event.getParam("searchString");
        }else{
            searchString='';
        }
        console.log('Contact List Item:'+searchString);
        action.setParams({
			"searchString": searchString
		});
        action.setCallback(this, function(a) {
            component.set("v.contacts", a.getReturnValue());
        });
        $A.enqueueAction(action);
    }    
})
Listener to Search Component-SearchComponentController.js
({
	loadJQuery: function(component, event, helper) {
        console.log('I am loaded');
        var lastValue = '';
		setInterval(function() {
    		if ($("#searchBox").val() != lastValue) {
	        	lastValue = $("#searchBox").val();
                console.log('New Value:'+lastValue);
		        var appEvent = $A.get("e.c:PFAppEvent");
		        appEvent.setParams({ "searchString" : lastValue });
		        appEvent.fire();                
	    	}
		}, 1500);        
	}

})

 
Here is my code below:

<ul id="insideScroller" class="scrollable-menu scrollbar list-group" style="-webkit-overflow-scrolling: touch;" >
<aura:iteration var="sobj" items="{!v.SobjectRecords}">
<!-- Navigation to record detail page works only SF1-->
<li class="list-group-item" id="{!sobj.SId}" onclick="{!c.navigateToRecord}" >
<aura:renderIf isTrue="{!0 lt v.fieldsToDisplayCount}"> {!v.lstFldDisp[0]} : {!sobj.f1}<br/>
</aura:renderIf>
<aura:renderIf isTrue="{!1 lt v.fieldsToDisplayCount}"> {!v.lstFldDisp[1]} : {!sobj.f2}<br/>
</aura:renderIf>
<aura:renderIf isTrue="{!2 lt v.fieldsToDisplayCount}"> {!v.lstFldDisp[2]} : {!sobj.f3}<br/>
</aura:renderIf> </li>
</aura:iteration>
</ul>
I am using bootstrapcss in which I am able to see scrollbar in SF1 and even on the desktop.But when I load the same page in mobile the scrollbar disappears.

Any workarounds over this?
I want to deploy application on app exchange to developer edition.
please tell me the process of application deployment on app exchange.
I have custom object expense__c and my Lightning namespace is LightningSF1. I want to create a page there I should display Expense object fields.
        There I have created one picklist field and one lookup field but that I don't know how to give those fields for that in component.

THIS IS MY COMPONENT CODE:-

<aura:component >
    <link href='/resource/Boot1' rel="stylesheet"/> 
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <aura:attribute name="newExpense" type="LightningSF1.Expense__c"
                    default="{ 'sobjectType': 'LightningSF1__Expense__c',
                             'Name': '',
                             'LightningSF1__Amount__c': 0,
                             'LightningSF1__Client__c': '',
                             'LightningSF1__Date__c': '',
                             'LightningSF1__Reimbursed__c': false
                             }"/>
    <div class="row " style="background-color:blue !important;">
        <div  style="text-align:center;font-weight:bold;color:white;">
            Outlet Information
        </div>
    </div>
    <br/>
    <div class="container">
        <div class="row" >
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4" >Expense Name</label>
                    <span class="col-sm-8">
                        <ui:inputText aura:id="expname"
                                      class="form-control"
                                      value="{!v.newExpense.Name}"
                                      placeholder="My Expense" required="true" />
                    </span>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4">Amount</label>
                    <span class="col-sm-8"> 
                        <ui:inputNumber aura:id="amount"
                                        class="form-control"
                                        value="{!v.newExpense.LightningSF1__Amount__c}"
                                        placeholder="20.80" required="true"/>
                    </span>
                </div>
            </div>
            
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4">Client</label>
                    <span class="col-sm-8">
                        <ui:inputText aura:id="client" 
                                      class="form-control"
                                      value="{!v.newExpense.LightningSF1__Client__c}"
                                      placeholder="ABC Co."/>
                    </span>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4">Expense Date</label >
                    <span class="col-sm-8">
                        <ui:inputDateTime aura:id="expdate" 
                                          class="form-control"
                                          value="{!v.newExpense.LightningSF1__Date__c}"/>
                    </span>
                </div>
            </div>
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4">Country</label>
                    <span class="col-sm-8">
                        <ui:outputText aura:id="country" 
                                      class="form-control"
                                      value="{!v.newExpense.LightningSF1__Country__c}"/>
                    </span>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4">Types</label >
                    <span class="col-sm-8">
                      <!-- <aura:attribute name="Name" type="String" /> -->
                    </span>
                </div>
            </div>
        </div>
    </div>
   <div class="col-sm-12">
       <span class="col-sm-6">
    <ui:button label="Submit" press="{!c.createExpense}"/>
       </span>
 <span class="col-sm-6">
     <ui:button label="Cancel" press="{!c.createExpense}"/>
       </span>
    </div>
</aura:component>

Here country is loookup field I want to show on page but fieldset tag
<ui:____for lookup I don't know like we know that tag for inout field is <ui:inputText> same way can anyone tell me tag for Lookup and picklist field...
String queryString = 
                'SELECT Id  'FROM Account ' +
                'WHERE DISTANCE(GeoLocation__c, GEOLOCATION('+lat1+','+lon1+'), \'mi\') < ' + Integer.valueOf(SelectedWithin) ;

Here lat1, lon1, selectedWithin are the variables.

Can you help me in converting this dynamic query into direct query?
Hi All,

I have created a lightning component with the help of some online tutorials, but i dont know how to see the output of that component. Can any one please guide me how to check the output of lightning compoent and also how to debug ligntning components.

Thanks
Hi,
It is not a question, I share my experience because I spent hours on this...
on my visualforce page, chrome kept telling me (in the Javascript console):
XMLHttpRequest cannot load https://eu3.salesforce.com/_ui/common/request/servlet/JsLoggingServlet.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'https://c.eu3.visual.force.com' is therefore not allowed access.
Browsing the net, I didn't find info on this error.
At the end, It appears this was due to a call to the "alert" javascript box just before the call to an "<apex:actionFunction". See below,
Javascript is:
function jsRemoveLineItemCatBtn() {
alert( 'CURRENT ID ' + vLICInProgressNum );
afRemoveLineItemCatBtn( String(vLICInProgressNum) );
}
where afRemoveLineItemCatBtn is the name of my action function.
Since I commented the call to alert, I don't have the error message anymore...
Hope to help few to save time.
 
Once the user saves the record, it must be saved as pdf and it should be mailed as an attachment to the record owner.
Hello,
I would like to build a VisualForce page to take the place of the Opportunities from Connections view for S2S so that I can add a couple custom fields to what is displayed.  However, I can't figure out where the data resides to get access to it.  The PartnerNetworkRecordConnection only shows that data that is shared and accepted.  How do I see the opportunity record data that is shared with my organization but not yet accepted?  Thanks!

Bridget
Hi folks,
       can anyone tell me soql for getting user id who has access the record??
Like 
I have created test objects
5 users in my org.
if user 1 creates record on test object then user2,user3,user5 access that reocrd and user4 cannot access the reocrd
I wanna soql query for get all user id who has permission to access the record that is created by user1

Thanks in advance
Karthick
I want to upload photo on facebook from salesforce. I have a access token now i want to upload photo on facebook  ?
hello

I have a requirement to integrate salesforce with google adwords. so that we can create ,run and stop a campaign through salesforce. i just need a bit of help to start with code. we can integrate it with SOAP API. has anyone done it before?

Thanks in advance
Shailesh 
Hi Gurus,

I am new to Salesforce and learning new skills. Need some details regarding integrating SAP and Salesforce.

I have created a interface using SAP PI(with SAP ECC) .. its a SOAP to RFC synchronous interface, created a WSDL.

Tested the WSDL using SOAP UI, its working perfectly fine.

In Salesforce, I have created a Apex Class using that WSDL. Now, I need to know how to call this service.

Can anyone Help ?? ( I will provide the Apex Class generated from WSDL)

Regards,
Roopa





Hi,
Has anyone done integration between Tempworks and SFDC, at least one-way, from Tempworks to SFDC?  What's involved - does Tempworks have the capability of pushing out data, or will SFDC have to pull it somehow?

Thanks.
Hi buddies,

I was not able to display records in horizontally.
Ex : In a table am retrieving phone,email from contact. Now i want to show phone,Email in horizontally.

Normally we can show them in columns, but my client needs thus to be display in horizontally.

Phone   98451212312      9876789989         9888999999
Email    test@test.com      test1@tes.com     test2@test.com

Waiting for your respnse buddies.

How to integrate authorize.net in salesforce for the credit card and echeck transactions.

Hi,

    i will try to run this class, i got an error like   <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><CreateCustomerProfileResponse xmlns="https://api.authorize.net/soap/v1/"><CreateCustomerProfileResult><resultCode>Error</resultCode><messages><MessagesTypeMessage><code>E00007</code><text>User authentication failed due to invalid authentication values.</text></MessagesTypeMessage></messages><customerProfileId>0</customerProfileId></CreateCustomerProfileResult></CreateCustomerProfileResponse></soap:Body></soap:Envelope>

 

Public class callExternalWS 
    { 
        public void invokeExternalWs() 
        { 
            HttpRequest req = new HttpRequest(); 
            //Set HTTPRequest Method 
            req.setMethod('POST'); 
            req.setEndpoint('https://api.authorize.net/soap/v1/Service.asmx'); 
            req.setMethod('POST'); 
            req.setHeader('Content-Type', 'text/xml; charset=utf-8'); 
            req.setHeader('SOAPAction', 'https://api.authorize.net/soap/v1/CreateCustomerProfile'); 
            string b =   '<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">'+ 
                          '<soap:Body><CreateCustomerProfile xmlns="https://api.authorize.net/soap/v1/">'+ 
                          '<merchantAuthentication><name>8j4W5UyB</name>'+ 
                          '<transactionKey>7mR2ah8655gLSR8q</transactionKey></merchantAuthentication>'+ 
    '<profile><description>description</description>'+ 
                          '<email>sforce2009@gmail.com</email>'+ 
                          '<paymentProfiles>'+ 
                          '<CustomerPaymentProfileType><customerType>individual</customerType>'+ 
    '<payment><creditCard><cardNumber>6011000000000012</cardNumber>'+ 
                          '<expirationDate>2009-12</expirationDate></creditCard>'+ 
                          '</payment></CustomerPaymentProfileType></paymentProfiles></profile>'+ 
                          '</CreateCustomerProfile></soap:Body></soap:Envelope>'; 
            req.setBody(b); 
            Http http = new Http(); 
            try { 
              //Execute web service call here        
              HTTPResponse res = http.send(req);    
              //Helpful debug messages 
              System.debug(res.toString()); 
              System.debug('STATUS:'+res.getStatus()); 
              System.debug('STATUS_CODE:'+res.getStatusCode()); 
              System.debug('STATUS_CODE:'+res.getBody()); 
            //YOU CAN ALWAYS PARSE THE RESPONSE XML USING XmlStreamReader  CLASS 
           } catch(System.CalloutException e) { 
                //Exception handling goes here.... 
         }        
    } 
    }

 

 

 thanks

sravani