• Shiva
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 28
    Questions
  • 28
    Replies

Is there any limitation for field name and reference name length in the custom object?

 

I have reference name "LicenseKey_Product_Release__r". giving error refrence not found. But I checked the referenace name permissions to the object etc. and they look good.

 

 

 

  • September 04, 2009
  • Like
  • 0

I have created VF page by extending the standard object. And I have created a validation rule for a field in the object. But it is not working may be because of custom page. Please can someone tell me how to invoke the rule in custom page?

 

Thanks in advance.

  • June 30, 2009
  • Like
  • 0

How to migrate new objects, classes, pages etc. from one sandbox to another? I have a created a package in sandbox1 and it has all the objects which want to move to sandbox2. Please let me know.

 

Thanks

 

  • June 26, 2009
  • Like
  • 0
Is it possible to find out what mode we are in(Add, edit,Delete,clone)? I want to find out this in the controller. If I am in ADD mode then I want to set default values to some fields otherwise no. Thanks in advance.
  • June 17, 2009
  • Like
  • 0

Based on the some condition I want to make few fields readonly. How in VF page?

 

 

 

 

 

 

  • June 16, 2009
  • Like
  • 0

Based on product selection I would like to populate product-line picklist? Any examples in apex code?

 

Thanks

  • June 04, 2009
  • Like
  • 0

Hi,

 

I have a VF page and it has account and contact lookup fields. Once I select account and then click on lookup for contact, it should show only the contacts for the selected account. How to do this in apex code?

 

Thanks

  • June 03, 2009
  • Like
  • 0

Hi,

 

I am getting System.Exception: DML currently not allowed

 

I am trying to update custom object from custom controller and I am getting the above error. I looked at the solutions and people suggested to use action from the page. But it won't work for me.

 

This is what I am trying to do.

 

I am sending a SOAP messages to my server (local) and I am getting the status from the same server based on the task executed at the server. I get two status(Yes/NO). I want to perform update if the status is 'Yes'

 

How to call update function from the action or any other way to do this?

 

Controller:

======

 

public class cs_LicenseKey {
       
    public cs_LicenseKey(ApexPages.StandardController controller) {

    }

 

    public cs_LicenseKey() {


       String strPageId = ApexPages.currentPage().getParameters().get('id');

       //

       if (Return value from SOAP is true)
          updateLicenseKey(strPageId,'Yes');

  }

 

 

void updateKey(String id,String St)
     {
         cs_Key__c lk = [select GenStatus__c
                from cs_Key__c LK
               where id =:id];
                               
         lk.GenStatus__c = St;
         update lk;
     }

 

 

}

  • June 02, 2009
  • Like
  • 0

I have webservices running on our server and I am sending the http header for security purpose from SFDC.

 

This code is in my SFDC controller.

 

Service.ServiceSOAP wsdl = new Service.ServiceSOAP();
       
        //Security
        wsdl.inputHttpHeaders_x = new Map<String, String>();

        //Setting a basic authentication header
       
        wsdl.inputHttpHeaders_x.put('Authorization', 'Act QWxhZGRpbjpvcGVuIHNlc2FtZQ==');

 

 

Please can someone give some sample code(Java) to read this http header at the other end. We are using JAVA.

 

Thanks

Shiva

  • May 27, 2009
  • Like
  • 0

I have a text and it has merged fields. Instead of using direct string replace, is it possible to use hash table concept? How to do in apex code?

 

Thanks

 

  • May 22, 2009
  • Like
  • 0

How can make it to only one column in page layout screen? By default they are 2 columns. Since I have big text field and I would like to spread the text box till to the boarder.

 

Thanks

 

  • May 21, 2009
  • Like
  • 0

I have created VF email template. How to call in VF page by using apex code?

 

Thanks

  • May 20, 2009
  • Like
  • 0

I have a situation where I want to use email template from SFDC but I don't want to send out an email from SFDC. Once I fill in the blanks in the email template, I want to send this email body(not any more the template because all data filled in) to my internal server by using web services. Sending to internal server is easy. But how can I get handle to the email body in apex code?

 

Thanks

 

 

  • May 20, 2009
  • Like
  • 0

I am calling same VF page from two custom buttons(Ex: Button1 and Button2) from the detailed page. How do I know which button user clicked? I need to perform different task based on the button choice.

 

Thanks

 

  • May 19, 2009
  • Like
  • 0

Hi,

 

I have a VF page and it has account and contact lookup fields. Once I select account and then click on lookup for contact, it should show only the contacts for the selected account. How to do this in apex code?

 

Thanks

 

  • May 18, 2009
  • Like
  • 0

Hi Guys,

 

I have two controllers and they are tied to idependent objects. Object names are cs_licenseKey__c and cs_Licensekeyoption__c. I am able to run these controllers one at a time on my custom visualforce page. But I am having difficulty to merge these two controller into one and display the data on the same page. I have pasted the code below. If you can help me to merge these two that will be great. Thanks in advance.

 

Remember second controller will return more than one record. But the first controller has only one record.

 

Thank you for your quick response. Please help me if you can. I am new to apex code.

 

Controller one:

=========

 

<apex:smileytongue:age controller="MyController" tabStyle="cs_LicenseKey__c">
<apex:form >
    <apex:smileytongue:ageBlock title="Confirmation">
      <apex:smileytongue:ageBlockSection title="License Ky Information">
        <apex:smileysurprised:utputField value="{!LicenseKey.Id}"/>
        <apex:smileysurprised:utputField value="{!LicenseKey.name}"/>
      </apex:smileytongue:ageBlockSection>
    </apex:smileytongue:ageBlock>
  </apex:form>
</apex:smileytongue:age>

 


public class MyController {

        private final cs_LicenseKey__c LicenseKey;
      
        
        public MyController() {
            LicenseKey = [select id,name from cs_LicenseKey__c where id = :ApexPages.currentPage().getParameters().get('id')];
                      
        System.debug(Logginglevel.DEBUG,'License Key Id ' + LicenseKey.id);
       System.debug(Logginglevel.DEBUG,'License Key Name ' + LicenseKey.name);
                                      
      }

      public cs_LicenseKey__c getLicenseKey() {
            return LicenseKey;
      }
     
}

 

Controller Two

===========

 

<apex:smileytongue:age controller="opportunityList2Con">
    <apex:smileytongue:ageBlock >
        <apex:smileytongue:ageBlockTable value="{!options}" var="o">
            <apex:column value="{!o.name}"/>
            <apex:column value="{!o.id}"/>
        </apex:smileytongue:ageBlockTable>
    </apex:smileytongue:ageBlock>
</apex:smileytongue:age>

 

 

 

public class opportunityList2Con {
    public ApexPages.StandardSetController setCon {
        get {
            if(setCon == null) {
                setCon = new ApexPages.StandardSetController(Database.getQueryLocator([select name,id from cs_licensekeyoption__c where LicenseKey__c = :ApexPages.currentPage().getParameters().get('id')]));
               
            }
            return setCon;
        }
        set;
    }
    public List<cs_licensekeyoption__c> getOptions() {
         return (List<cs_licensekeyoption__c>:smileywink: setCon.getRecords();
    }
}

  • May 14, 2009
  • Like
  • 0

Hi,

 

I have a situation where I need to display two different custom controllers on te same page.

 

1. First controller has one record.

2. Second controller has an array.

 

Thanks for your help in advance.

 

 

 

  • May 13, 2009
  • Like
  • 0
I have custom page and  I would like to redrect to another page after some process. What is the command in apex?
  • May 13, 2009
  • Like
  • 0

I have custom page and I would like to display message box after some task is done.

 

How can I do that?

 

Thanks

 

  • May 13, 2009
  • Like
  • 0

How to migrate new objects, classes, pages etc. from one sandbox to another? I have a created a package in sandbox1 and it has all the objects which want to move to sandbox2. Please let me know.

 

Thanks

 

  • June 26, 2009
  • Like
  • 0

Based on the some condition I want to make few fields readonly. How in VF page?

 

 

 

 

 

 

  • June 16, 2009
  • Like
  • 0

Hi,

 

I am getting System.Exception: DML currently not allowed

 

I am trying to update custom object from custom controller and I am getting the above error. I looked at the solutions and people suggested to use action from the page. But it won't work for me.

 

This is what I am trying to do.

 

I am sending a SOAP messages to my server (local) and I am getting the status from the same server based on the task executed at the server. I get two status(Yes/NO). I want to perform update if the status is 'Yes'

 

How to call update function from the action or any other way to do this?

 

Controller:

======

 

public class cs_LicenseKey {
       
    public cs_LicenseKey(ApexPages.StandardController controller) {

    }

 

    public cs_LicenseKey() {


       String strPageId = ApexPages.currentPage().getParameters().get('id');

       //

       if (Return value from SOAP is true)
          updateLicenseKey(strPageId,'Yes');

  }

 

 

void updateKey(String id,String St)
     {
         cs_Key__c lk = [select GenStatus__c
                from cs_Key__c LK
               where id =:id];
                               
         lk.GenStatus__c = St;
         update lk;
     }

 

 

}

  • June 02, 2009
  • Like
  • 0

How can make it to only one column in page layout screen? By default they are 2 columns. Since I have big text field and I would like to spread the text box till to the boarder.

 

Thanks

 

  • May 21, 2009
  • Like
  • 0

I am calling same VF page from two custom buttons(Ex: Button1 and Button2) from the detailed page. How do I know which button user clicked? I need to perform different task based on the button choice.

 

Thanks

 

  • May 19, 2009
  • Like
  • 0

Okay...so I have been trying for a couple of hours now to create a nested list that contains three sobjects...and cannot get it working. At this point I think I am simply running into a syntax issue. Checked in the docs but they were not very helpful. Any insight would be greatly appreciated.

 

Essentially what I need to create is a nested List that has the following structure (Forgive me for bad syntax):

 

LIST<Accounts List<Contacts List<Tasks associated with those contacts>>>

 

Or in English:

 

Accounts with all contacts and all tasks associated with those contacts.

 

It would be a simple task in Javascript/S-Control...but I cannot seem to make the conceptual leap to APEX on this one

 

Any help/insight/samples would be greatly appreciated.

 

Hi Guys,

 

I have two controllers and they are tied to idependent objects. Object names are cs_licenseKey__c and cs_Licensekeyoption__c. I am able to run these controllers one at a time on my custom visualforce page. But I am having difficulty to merge these two controller into one and display the data on the same page. I have pasted the code below. If you can help me to merge these two that will be great. Thanks in advance.

 

Remember second controller will return more than one record. But the first controller has only one record.

 

Thank you for your quick response. Please help me if you can. I am new to apex code.

 

Controller one:

=========

 

<apex:smileytongue:age controller="MyController" tabStyle="cs_LicenseKey__c">
<apex:form >
    <apex:smileytongue:ageBlock title="Confirmation">
      <apex:smileytongue:ageBlockSection title="License Ky Information">
        <apex:smileysurprised:utputField value="{!LicenseKey.Id}"/>
        <apex:smileysurprised:utputField value="{!LicenseKey.name}"/>
      </apex:smileytongue:ageBlockSection>
    </apex:smileytongue:ageBlock>
  </apex:form>
</apex:smileytongue:age>

 


public class MyController {

        private final cs_LicenseKey__c LicenseKey;
      
        
        public MyController() {
            LicenseKey = [select id,name from cs_LicenseKey__c where id = :ApexPages.currentPage().getParameters().get('id')];
                      
        System.debug(Logginglevel.DEBUG,'License Key Id ' + LicenseKey.id);
       System.debug(Logginglevel.DEBUG,'License Key Name ' + LicenseKey.name);
                                      
      }

      public cs_LicenseKey__c getLicenseKey() {
            return LicenseKey;
      }
     
}

 

Controller Two

===========

 

<apex:smileytongue:age controller="opportunityList2Con">
    <apex:smileytongue:ageBlock >
        <apex:smileytongue:ageBlockTable value="{!options}" var="o">
            <apex:column value="{!o.name}"/>
            <apex:column value="{!o.id}"/>
        </apex:smileytongue:ageBlockTable>
    </apex:smileytongue:ageBlock>
</apex:smileytongue:age>

 

 

 

public class opportunityList2Con {
    public ApexPages.StandardSetController setCon {
        get {
            if(setCon == null) {
                setCon = new ApexPages.StandardSetController(Database.getQueryLocator([select name,id from cs_licensekeyoption__c where LicenseKey__c = :ApexPages.currentPage().getParameters().get('id')]));
               
            }
            return setCon;
        }
        set;
    }
    public List<cs_licensekeyoption__c> getOptions() {
         return (List<cs_licensekeyoption__c>:smileywink: setCon.getRecords();
    }
}

  • May 14, 2009
  • Like
  • 0

Hi,

 

I have a situation where I need to display two different custom controllers on te same page.

 

1. First controller has one record.

2. Second controller has an array.

 

Thanks for your help in advance.

 

 

 

  • May 13, 2009
  • Like
  • 0
I have custom page and  I would like to redrect to another page after some process. What is the command in apex?
  • May 13, 2009
  • Like
  • 0

I have created new package in SFDC but I want to add the same package to eclipse project. How?

 

Thanks

 

  • May 06, 2009
  • Like
  • 0

Hi, I am trying to push some data to the salesforce from my web site. Here is the testing code. However, when it runs, there is an error occured with the LOGIN line: "INVALID_LOGIN: Invalid username or password or locked out."

 

 

-------

<?php

    $USERNAME = "ABC@gmail.com";
    $PASSWORD = "password";

   
    define("SOAP_CLIENT_BASEDIR", "register-plus/salesforce_php");


    require_once (SOAP_CLIENT_BASEDIR.'/SforceEnterpriseClient.php');
    require_once (SOAP_CLIENT_BASEDIR.'/SforceHeaderOptions.php');
    require_once (SOAP_CLIENT_BASEDIR.'/userAuth.php');


    try {
        $mySforceConnection = new SforceEnterpriseClient();
        $mySoapClient =      $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.'/enterprise.wsdl.xml');
   
        $mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);
       
        $sObject = new stdclass();
        $sObject->FirstName = 'Smith';
        $sObject->LastName = 'John';
        $sObject->Phone = '510-555-5555';

        $createResponse = $mySforceConnection->create(array($sObject), 'Leads');

        $ids = array();
        foreach ($createResponse as $createResult) {
            print_r($createResult);
            array_push($ids, $createResult->id);
        }

        } catch (Exception $e) {
            echo $mySforceConnection->getLastRequest();
            echo $e->faultstring;
    }
?>