• Developer99
  • NEWBIE
  • 5 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 23
    Questions
  • 18
    Replies
HI,

           IN my object i have 2 fields one is checkbox, another is text if i checked the checkbox at that time field must be visiable, when i unchecked checkbox field must be disiable. shall i achieved this by using validation rule or i want to gofor vf pages.
HI,

               i want to created the field based upon radio button click, when i click in radio button new field will be created and that value i want to store in object can any-one suggest me
have 2 objects name quote,quotelineitems here both are related with master-detail relationship, i wrote a trigger on quote(parent). whenever any field is changed in quote automatically in quoteline item i have a field Isupdated change to false.Intinally while inserting records Isupdate field is True, whenever i update any field in quote then it have to change to false, i am getting the issuse while inserting records automatically Isupdated field is taking false, without updating anything in quote. My trigger:


trigger quotetrg on Quote__c (after update)
{
    list<Quote__c> s1 = new list<Quote__c>();
    s1 = [select City__c from  Quote__c];

    list<Quote_Item__c> f1 = new list<Quote_Item__c>();
    f1 = [select Updated_del__c from Quote_Item__c];

    for(Quote_Item__c f :f1)
    {
        for(Quote__c s : Trigger.old)
        {
            f.Updated_del__c = s.City__c;

            f.Updated_del__c = 'Krish';
            update f;
        }
    }
}
HI,

        I am working with quotes and quote-line items  here quote-line items is the child object and quote is parent both having master-detail relation ship,
  
         when i update the tax field in quote.. in quote line item i have a field update that must be changed to false can any one suggest me how to write the trigger for this task.
HI,

      I want to reterview the last modified  by 15mins records in Opportunities in Soap API Webservice Class CAn any one suggest me how to write the query for my task.
HI,


           I am getting the Product records from external system to sfdc. Now in salesforce on the product object I have a field called Unit-Price. When I update the field unit-price in salesforce at the same time i want to update the field of unit-price in External System, How can i achieve this, is it possible by using outbound-messages, or should i want to go for REST. Give me suggestions.

If i go for rest means what are the steps i want to follow can anyone suggest me..which is the better way for my requirement
HI,

                 I want to know how salesforce can connect to PHP, As per My requriment in product object i have Unit-Price Field when i update that field in salesforce, that field value must be Update in PHP...How can Achieve this Requriment...
Hi,

             I generate a yearly sales report i want to schedule it to my manager  yearly but in salesforce sehedule runs i found daily,weekly, monthly option  is there any option to schedule the  report to my manager on yearly basics.
HI,

        i want to implement the record types concept for my visaulforce pages, may i know how can i implement the record types for custom visualforce pages
HI,,

          I want to create a Record types for visualforce pages,  May i know is it possible, if means can any one provide sample code for this task.
HI,

          In my service it showing that an error for  products Upsert

    
     Map<string,Product2> existpccMap = new Map<string,Product2>();
   set<string> pCodeSet = new set<string>();
 

for(integer k = 0;k<req.accounts.size(); k++){ // ONCE CHECK IT
        for(integer j=0;j<req.accounts[k].prods.size();j++)
        {
            pCodeSet.add(req.accounts[k].prods[j].pCode);
        }
  
(Product2 p2 : [select id,productCode from Product2 where ProductCode IN : pCodeSet]) {
    existpccMap.put(p2.productCode,p2);
}
for(integer j=0; j< req.accounts[k].prods.size(); j++) {

   if (existpccMap.containsKey(req.accounts[k].prods[j].pCode)) {
     p = existpccMap.get(req.accounts[k].prods[j].pCode);
   } else {
     p = new Product2();
   }
   p.productCode = req.accounts[k].prods[j].pCode;
   p.name =req.accounts[k].prods[j].pName;
   pList.add(p);
}
}
Database.upsert(pList); // Error Occur Point     May  i know what i have to do.
HI,

        1)  I created a Webservice by using Eclipse i want to generate a wsdl for that webservice by using ECLIPSE  may i know is it possible to create a wsdl file by using Eclipse.
HI,

          I want to remove the required field in Opportunity Layout, the field is CloseDate may i know how it is possible.
HI,

         I am getting confusion about callouts, when third party system connect to salesforce callouts are hit, or salesforce is hit the thirdparty system at that time callouts are executed in which case callouts are used,

       And one more doubt is some thirdparty system are axcess the account records from salesforce for that they ask me endpoint url for account object may i know how can i create a endpoint url for account.which endpoint url i want to give to thirdparty developers.
HI,

    we are connecting from php to salesforce,while connecting we are getting an error is
 
  Ooop! Error: System.NullPointerException: Attempt to de-reference a null object Class.Ctest.cInsert: line  a1.Name = req.accName;

 My Webservice class
 
global class Ctest
{
// Request Class
global class RequestClass
{
  webservice String accName;
}
// Response Class
global class ResponseClass
{
webservice String acName;
}

RequestClass req = new RequestClass();
webservice static ResponseClass  cInsert(RequestClass req)
{
 ResponseClass res = new ResponseClass();
   Account a1 = new Account();
   a1.Name = req.accName; // Error showing point
    insert a1;
  // Return Response
   res.acName = a1.Name;
   return res;
}
}

And my php code is

  require_once('salesforceAPI/soapclient/SforceEnterpriseClient.php');
require_once('salesforceAPI/soapclient/SforceHeaderOptions.php');

$sfdc = new SforceEnterpriseClient();
$SoapClient = $sfdc->createConnection('enterprise.wsdl.xml');

$loginResult = false;

$loginResult = $sfdc->login(USER, PASSWORD . SECURITY_KEY);

$parsedURL = parse_url($sfdc->getLocation());
define("_SFDC_SERVER_", substr($parsedURL['host'], 0, strpos($parsedURL['host'], '.')));
define("_WS_NAME_", 'salesforceAPI/Ctest');
define("_WS_WSDL_", _WS_NAME_ . '.xml');
define("_WS_ENDPOINT_", 'https://' . _SFDC_SERVER_ . '.salesforce.com/services/wsdl/class/' . _WS_NAME_);
define("_WS_NAMESPACE_", 'http://soap.sforce.com/schemas/class/' . _WS_NAME_);

$client = new SoapClient(_WS_WSDL_);
$sforce_header = new SoapHeader(_WS_NAMESPACE_, "SessionHeader", array("sessionId" => $sfdc->getSessionId()));
$client->__setSoapHeaders(array($sforce_header));

$method = $client->__getFunctions();

$wsParams = array('accName' => 'XXXXXXX');

$client->cInsert($wsParams)
HI,

          i want to deploy my whole application from sandbox to production may i know what are steps that means first i want to deploy app, then after objects or fileds or first i want to deploy class or visualforce pages. i need information first i want to deploy what..??
HI,

   
  
    I want to divide my visualforce page into 2 girds, in gird1 i need 5 small girds when i click on small gird the gird2 wants to change, based upon the small girds  may i know how can i achieve this type of girds in visualforce page
HI,

        I am getting daily csv files from other system. it contains the information of account name, contact detials, opportunity details and quote details i want import the records for every 30mins into salesforce, may i know how can i import those records into salesforce for every 30mins.can any one explain me.
HI.

     I have attachments for account objects, we want to get  the attachemnts from salesforce to java, for that i want to create a endpoint url,
for attachments may i know how can i get the attachements from salesforce. How can i create a endpoint url for that attachments
HI,

        In my organization java people are connecting to salesforce, for that i want to give clientid,client secreat for that while i entering the details i struck up with call back url may i know which url i have to fill in that field. can any one explain me.
HI,

               i want to created the field based upon radio button click, when i click in radio button new field will be created and that value i want to store in object can any-one suggest me
HI,

        i want to implement the record types concept for my visaulforce pages, may i know how can i implement the record types for custom visualforce pages
Hi,

      When we are connecting to sfdc using the SOAP API we are receiving an error message:

   


ini_set("soap.wsdl_cache_enabled", "0");
ini_set(E_ALL,1);
ini_set('display_errors',1);


// Include the PHP Toolkit
require_once('salesforceAPI/soapclient/SforcePartnerClient.php');
require_once('salesforceAPI/soapclient/SforceHeaderOptions.php');

// Login
define('USER','dddd@sfdc.com');
define('PASSWORD', 'defr234');
define('SECURITY_KEY', 'awed2341xIm3WAoq6I6XoHxG');

//echo userName;
//echo password;
//echo securitytoken;

$sfdc = new SforcePartnerClient();
$SoapClient = $sfdc->createConnection('salesforceAPI/partner.wsdl.xml');

$loginResult = false;

try {
    // log in with username, password and security token if required
   $loginResult = $sfdc->login(USER, PASSWORD . SECURITY_KEY);
} catch (Exception $e) {
    global $errors;
    $errors = $e->faultstring;
    echo "Fatal Login Error <b>" . $errors . "</b>";
    die;
}

// Define constants for the web service. We'll use these later
$parsedURL = parse_url($sfdc->getLocation());
define ("_SFDC_SERVER_", substr($parsedURL['host'],0,strpos($parsedURL['host'], '.')));
define ("_WS_NAME_", 'salesforceAPI/Ctest');
define ("_WS_WSDL_", _WS_NAME_ . '.xml');
define ("_WS_ENDPOINT_", 'https://' . _SFDC_SERVER_ . '.salesforce.com/services/wsdl/class/' . _WS_NAME_);
define ("_WS_NAMESPACE_", 'http://soap.sforce.com/schemas/class/' . _WS_NAME_);

$client = new SoapClient(_WS_WSDL_);
$sforce_header = new SoapHeader(_WS_NAMESPACE_, "SessionHeader", array("sessionId" => $sfdc->getSessionId()));
$client->__setSoapHeaders(array($sforce_header));

$method = $client->__getFunctions();
echo _SFDC_SERVER_."<br>";
echo _WS_NAME_."<br>";
echo _WS_WSDL_."<br>";
echo _WS_ENDPOINT_."<br>";
echo _WS_NAMESPACE_."<br>";
//
try {

    $wsParams=array('name' =>'hhhi');
    // call the web service via post
    $client->cInsert($wsParams);

// this is really bad.
} catch (Exception $e) {
    global $errors;
    $errors = $e->faultstring;
    echo "Ooop! Error: <b>" . $errors . "</b>";
    die;
}
Hi,

      When we are connecting to sfdc using the SOAP API we are receiving an error message:

    


ini_set("soap.wsdl_cache_enabled", "0");
ini_set(E_ALL,1);
ini_set('display_errors',1);


// Include the PHP Toolkit
require_once('salesforceAPI/soapclient/SforcePartnerClient.php');
require_once('salesforceAPI/soapclient/SforceHeaderOptions.php');

// Login
define('USER','dddd@sfdc.com');
define('PASSWORD', 'defr234');
define('SECURITY_KEY', 'awed2341xIm3WAoq6I6XoHxG');

//echo userName;
//echo password;
//echo securitytoken;

$sfdc = new SforcePartnerClient();
$SoapClient = $sfdc->createConnection('salesforceAPI/partner.wsdl.xml');

$loginResult = false;

try {
    // log in with username, password and security token if required
   $loginResult = $sfdc->login(USER, PASSWORD . SECURITY_KEY);
} catch (Exception $e) {
    global $errors;
    $errors = $e->faultstring;
    echo "Fatal Login Error <b>" . $errors . "</b>";
    die;
}

// Define constants for the web service. We'll use these later
$parsedURL = parse_url($sfdc->getLocation());
define ("_SFDC_SERVER_", substr($parsedURL['host'],0,strpos($parsedURL['host'], '.')));
define ("_WS_NAME_", 'salesforceAPI/Ctest');
define ("_WS_WSDL_", _WS_NAME_ . '.xml');
define ("_WS_ENDPOINT_", 'https://' . _SFDC_SERVER_ . '.salesforce.com/services/wsdl/class/' . _WS_NAME_);
define ("_WS_NAMESPACE_", 'http://soap.sforce.com/schemas/class/' . _WS_NAME_);

$client = new SoapClient(_WS_WSDL_);
$sforce_header = new SoapHeader(_WS_NAMESPACE_, "SessionHeader", array("sessionId" => $sfdc->getSessionId()));
$client->__setSoapHeaders(array($sforce_header));

$method = $client->__getFunctions();
echo _SFDC_SERVER_."<br>";
echo _WS_NAME_."<br>";
echo _WS_WSDL_."<br>";
echo _WS_ENDPOINT_."<br>";
echo _WS_NAMESPACE_."<br>";
//
try {

    $wsParams=array('name' =>'hhhi');
    // call the web service via post
    $client->cInsert($wsParams);

// this is really bad.
} catch (Exception $e) {
    global $errors;
    $errors = $e->faultstring;
    echo "Ooop! Error: <b>" . $errors . "</b>";
    die;
}
Hi,

I have a requirement where i need to send a data upon creation to an external hub using Webservices. I mean when a record in a custom object is created , the data in the fields should also get stored in the external system. Any ideas on how do this is really appreciated.

Thanks
have 2 objects name quote,quotelineitems here both are related with master-detail relationship, i wrote a trigger on quote(parent). whenever any field is changed in quote automatically in quoteline item i have a field Isupdated change to false.Intinally while inserting records Isupdate field is True, whenever i update any field in quote then it have to change to false, i am getting the issuse while inserting records automatically Isupdated field is taking false, without updating anything in quote. My trigger:


trigger quotetrg on Quote__c (after update)
{
    list<Quote__c> s1 = new list<Quote__c>();
    s1 = [select City__c from  Quote__c];

    list<Quote_Item__c> f1 = new list<Quote_Item__c>();
    f1 = [select Updated_del__c from Quote_Item__c];

    for(Quote_Item__c f :f1)
    {
        for(Quote__c s : Trigger.old)
        {
            f.Updated_del__c = s.City__c;

            f.Updated_del__c = 'Krish';
            update f;
        }
    }
}
HI,

        I am working with quotes and quote-line items  here quote-line items is the child object and quote is parent both having master-detail relation ship,
  
         when i update the tax field in quote.. in quote line item i have a field update that must be changed to false can any one suggest me how to write the trigger for this task.
HI,


           I am getting the Product records from external system to sfdc. Now in salesforce on the product object I have a field called Unit-Price. When I update the field unit-price in salesforce at the same time i want to update the field of unit-price in External System, How can i achieve this, is it possible by using outbound-messages, or should i want to go for REST. Give me suggestions.

If i go for rest means what are the steps i want to follow can anyone suggest me..which is the better way for my requirement
Hi,

             I generate a yearly sales report i want to schedule it to my manager  yearly but in salesforce sehedule runs i found daily,weekly, monthly option  is there any option to schedule the  report to my manager on yearly basics.
HI,

        i want to implement the record types concept for my visaulforce pages, may i know how can i implement the record types for custom visualforce pages
HI,

          In my service it showing that an error for  products Upsert

    
     Map<string,Product2> existpccMap = new Map<string,Product2>();
   set<string> pCodeSet = new set<string>();
 

for(integer k = 0;k<req.accounts.size(); k++){ // ONCE CHECK IT
        for(integer j=0;j<req.accounts[k].prods.size();j++)
        {
            pCodeSet.add(req.accounts[k].prods[j].pCode);
        }
  
(Product2 p2 : [select id,productCode from Product2 where ProductCode IN : pCodeSet]) {
    existpccMap.put(p2.productCode,p2);
}
for(integer j=0; j< req.accounts[k].prods.size(); j++) {

   if (existpccMap.containsKey(req.accounts[k].prods[j].pCode)) {
     p = existpccMap.get(req.accounts[k].prods[j].pCode);
   } else {
     p = new Product2();
   }
   p.productCode = req.accounts[k].prods[j].pCode;
   p.name =req.accounts[k].prods[j].pName;
   pList.add(p);
}
}
Database.upsert(pList); // Error Occur Point     May  i know what i have to do.
HI,

        1)  I created a Webservice by using Eclipse i want to generate a wsdl for that webservice by using ECLIPSE  may i know is it possible to create a wsdl file by using Eclipse.
HI,

    we are connecting from php to salesforce,while connecting we are getting an error is
 
  Ooop! Error: System.NullPointerException: Attempt to de-reference a null object Class.Ctest.cInsert: line  a1.Name = req.accName;

 My Webservice class
 
global class Ctest
{
// Request Class
global class RequestClass
{
  webservice String accName;
}
// Response Class
global class ResponseClass
{
webservice String acName;
}

RequestClass req = new RequestClass();
webservice static ResponseClass  cInsert(RequestClass req)
{
 ResponseClass res = new ResponseClass();
   Account a1 = new Account();
   a1.Name = req.accName; // Error showing point
    insert a1;
  // Return Response
   res.acName = a1.Name;
   return res;
}
}

And my php code is

  require_once('salesforceAPI/soapclient/SforceEnterpriseClient.php');
require_once('salesforceAPI/soapclient/SforceHeaderOptions.php');

$sfdc = new SforceEnterpriseClient();
$SoapClient = $sfdc->createConnection('enterprise.wsdl.xml');

$loginResult = false;

$loginResult = $sfdc->login(USER, PASSWORD . SECURITY_KEY);

$parsedURL = parse_url($sfdc->getLocation());
define("_SFDC_SERVER_", substr($parsedURL['host'], 0, strpos($parsedURL['host'], '.')));
define("_WS_NAME_", 'salesforceAPI/Ctest');
define("_WS_WSDL_", _WS_NAME_ . '.xml');
define("_WS_ENDPOINT_", 'https://' . _SFDC_SERVER_ . '.salesforce.com/services/wsdl/class/' . _WS_NAME_);
define("_WS_NAMESPACE_", 'http://soap.sforce.com/schemas/class/' . _WS_NAME_);

$client = new SoapClient(_WS_WSDL_);
$sforce_header = new SoapHeader(_WS_NAMESPACE_, "SessionHeader", array("sessionId" => $sfdc->getSessionId()));
$client->__setSoapHeaders(array($sforce_header));

$method = $client->__getFunctions();

$wsParams = array('accName' => 'XXXXXXX');

$client->cInsert($wsParams)
Hi,
Below is the JSON Response of External REST Service API. My requirement is to extract a piece of data from the response. I am unable to deserialize the piece of data which is in BOLD.

{"sports" :[{"name" :"tennis","id" :850,"uid" :"s:850","leagues" :[{"name" :"Association of Tennis Professionals","abbreviation" :"atp","id" :850,"groupId" :"atp","shortName" :"ATP","athletes" :[{"id" :760,"firstName" :"Jorge","lastName" :"Aguilar","fullName" :"Jorge Aguilar","displayName" :"Jorge Aguilar","shortName" :"J. Aguilar","links" :{"api" :{"athletes" :{"href" :"http://api.espn.com/v1/sports/tennis/atp/athletes/760"},"news" :{"href" :"http://api.espn.com/v1/sports/tennis/atp/athletes/760/news"},"notes" :{"href" :"http://api.espn.com/v1/sports/tennis/atp/athletes/760/news/notes"}},"web" :{"athletes" :{"href" :"http://espn.go.com/tennis/player/_/id/760?ex_cid=espnapi_public"}},"mobile" :{"athletes" :{"href" :"http://m.espn.go.com/general/tennis/playercard?playerId=760&ex_cid=espnapi_public"}}}}]
}]}],"resultsOffset" :0,"resultsLimit" :50,"resultsCount" :1,"timestamp" :"2014-02-19T07:35:25Z","status" :"success"}
HI EVERY ONE ,

          I NEED TO INSERT A  ACCOUNT WHILE  LODING VF PAGE ,SO I HAVE WRITTEN SOME CODE BUT ITS GIVE ERROR PLZ FOLLOW THIS


<apex:page controller="InsertAccount"  action="{!insertAccount}">
<apex:form >
{!msg}
</apex:form>
</apex:page>

CLASS

public class InsertAccount
{
public string msg{get;set;}
public void insertAccount()
{
Account a=new Account();
a.Name='Sairamu';
a.AccountNumber='68348657279';
insert a;
msg='Account record successfully insertyd..';
}



ERROR MESSAGE:

Visualforce Error
Help for this Page

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, createNewAccountOpportunity: execution of AfterInsert caused by: System.DmlException: Update failed. First exception on row 0; first error: MISSING_ARGUMENT, Id not specified in an update call: [] Trigger.createNewAccountOpportunity: line 15, column 1: []
Error is in expression '{!insertAccount}' in component <apex:page> in page accountinsert


SO CAN PLZ ANY ONE HELP OUT OF THIS???????????/
Hi there,
I am writing a webservice callout which is triggered on clicking a link in an Account detail page; Upon the click of the link, the code will go to the external system and get the record from the other system based on the account I clicked the link from and display in a VF page.
So far, I've got to the point where i could retrieve from the endpoint but I do not know how to put the condition based on which Account Id i click the link from?

<!-----Visualforce Page-------------->
<apex:page controller="GetRestfulExample" action="{!fetchData}" contentType="text/plain">
     {!response}
</apex:page>

<!---------Controller----------->
public class GetRestfulExample {
    private final String serviceEndpoint= 'http://headers.jsontest.com/';
    public String Response { get; set;}
    public String Headers { get; set; }
   
    public void fetchData() {
        getAndParse('GET');
    }

  public void getAndParse(String GET) {

    // Get the XML document from the external server
    Http http = new Http();
    HttpRequest req = new HttpRequest();
    req.setEndpoint(serviceEndpoint);
   
    req.setMethod('GET');
    HttpResponse res = http.send(req);

    System.debug(res.getBody());
     this.response=res.getBody();
  }
}

Where can I put the condition to just display the fields for this account I am currently in?

Please throw me some ideas!

Thanks,
justin~sfdc

Using the Saleforce SforcePartnerClient, getting this error when I try to query a custom object.  I am using the associated partner wsdl xml file for the account.

 

Error:

 

Unexpected exception of type [SoapFault] with message [Element {}item invalid at this location] in [/Applications/XAMPP/xamppfiles/htdocs/xampp/libraries/sforce/SforceBaseClient.php line 782]

 

Thanks,

-Laura