• Anjaan
  • NEWBIE
  • 0 Points
  • Member since 2008

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

Hello,

 

I have records in <apex:pageBlockTable> and in one column i use a CommandLink to show the detail about that particular record below in another pageBlock. It is working fine but i want to achieve the functionality described on Sample.

 

I am using command Link as

 

<apex:commandLink value="Show Detail" reRender="detailPanel" status="waitStatus"> <apex:param name="errorListId" value="{!activity.activityId}"/> </apex:commandLink>

 

 

where detailPanel is  the <apex:outputPanel> where i have to focus. 

 

Thanks and Regards

 

Osman Ashraf Bajwah

SalesForce Developer

Technosoft Solutions

 

  • February 18, 2009
  • Like
  • 0

I am writing a s control, in this scontrol i am invoking a web service. when i run it in my developer's account it runs fantastic but when i make the package and deploy it on any other account including developer i get an error msg:

 

{faultcode:'sf:INSUFFICIENT_ACCESS', faultstring:'CTCTEmailHistoryBO: no access allowed to this class.', }

 

 

Here is the javascript scontrol code:

<html> <head> <script type="text/javascript" src="/js/functions.js"></script> <script type="text/javascript" src="/soap/ajax/10.0/connection.js"></script> <script type="text/javascript" src="/soap/ajax/10.0/apex.js"></script> <script type = "text/javascript"> function getNextList(){ var pageCounter = document.getElementById('pageCounter'); pageCounter.value++; var id = '{!Contact.Id}' var sDiv = document.getElementById('sDiv'); sDiv.innerHTML = sforce.apex.execute('CTCTEmailHistoryBO','nextList',{arg:id,arg1:pageCounter.value}); } function getPrevList(){ var pageCounter = document.getElementById('pageCounter'); if(pageCounter.value >0){ pageCounter.value--; var id = '{!Contact.Id}' var sDiv = document.getElementById('sDiv'); sDiv.innerHTML = sforce.apex.execute('CTCTEmailHistoryBO','prevList',{arg:id,arg1:pageCounter.value}); }else{ alert("No Lists Found"); } } </script> </head> <body style="background-color:#F3F3EC"> <div width = "100%"align="center" id = "sDiv" > <input type="hidden" value="0" id="pageCounter" /> </div> <script type = "text/javascript"> try{ var pageCounter = document.getElementById('pageCounter'); var id = '{!Contact.Id}' var sDiv = document.getElementById('sDiv'); sDiv.innerHTML =sforce.apex.execute('CTCTEmailHistoryBO','getListHTML',{arg:id,arg1:pageCounter.value}); }catch(Error){ alert(Error); } </script> </body> </html>

 Its really urgent please help me

 

Osman Ashraf Bajwah

Technosoft

 

 

 

  • February 02, 2009
  • Like
  • 0
Hello All

I am using <apex:selectlist  size = "1"> for making a select box. \
i have a number of selectlists and want to show the same data in them but i have to set the different selected values on each list. Here is my Code
Code:
My Controller

public List<SelectOption> getItems() {
                List<SelectOption> options = new List<SelectOption>();
                options.add(new SelectOption('US','US'));
                options.add(new SelectOption('CANADA','Canada'));
                options.add(new SelectOption('MEXICO','Mexico'));
                return options;
        }

public String[] getCountries(){
        return countries;
    }
    public void setCountries(String[] countries){
        this.countries = countries;
    }

 and the page...

Code:
<apex:selectList value="{!countries}" size="1" required="true">
    <apex:selectOptions value="{!items}"/>
 </apex:selectList>

<apex:selectList value="{!countries}" size="1" required="true">
     <apex:selectOptions value="{!items}"/>
</apex:selectList>
                 

 both are showing the same value "USA" i want to show CANADA on the second list by default.......

Please help me


  • January 02, 2009
  • Like
  • 0
Hello All,
 
I want to get field names of an SObject like Contact or Account. How can i get them. Currently i am trying to get them via

Map<String, Schema.SObjectField> m = Schema.SObjectType.Contact.fields.getMap();

I can get the string by m.getKeySet but how can i get the field names using Schema.SObjectField


Code:
public List<String> getDBFields(){

Map<String, Schema.SObjectField> m = Schema.SObjectType.Contact.fields.getMap();         

List<SObjectField> temp = m.values();

// Now i have to get the Label of each field

}

 Anyone help please


  • January 01, 2009
  • Like
  • 0
Hello All,

How to show error messages when using <apex:inputText>.

Thanks in Advance
Osman
  • December 22, 2008
  • Like
  • 0
Hello All,

How to show error message when an <apex:inputText> is to used just like in SalesForce.

Thanks and Regards
Osman Ashraf Bajwah
Software Engineer
  • December 18, 2008
  • Like
  • 0
Hello All,
       I am integrating an application in Salesforce.com. It starts from contact/campaign/leeds details page. I have to upload these contacts somewhere. I have made some custom apex pages and they are similar for all three of them. How can i tell the page that this is contact's or campaign's or leed's style.

Thanks and Regards
Osman Ashraf Bajwah
Software Engineer
  • December 18, 2008
  • Like
  • 0
Hello All

In a wizard, if i click next button i want to show a status msg like "Loggin in " etc like a Popup. this popup should not be javascript based. This status msg window should be closed after a particular time. I want to inquire about any widget or component that may help because popups may be blocked.
  • December 04, 2008
  • Like
  • 0
Hello All,


I am developing a custom application using visualforce. The application gets its data from another site. I want to add some data to be remembered (Session). How can i set the session if possible. If not, then what to do in order to preserve the data to be used in other classes.

waiting for your kind reply

Thanks and Regards
Osman Ashraf Bajwah
Software Engineer

  • December 03, 2008
  • Like
  • 0
Hello All,

I have used a checkbox with some button. The button is disabled by default. when the checkbox is checked it should be enabled. otherwise not. i am facing some problems you may help me. Its really urgent.

I am attaching the code


<apex:page >
<script type="text/javascript">
   
    function enable(checkbox, btn){
        if(checkbox.checked){
            document.getElementById(btn).disabled = false;
         
        }else{
            document.getElementById(btn).disabled = true;
        }
    }

</script>
<apex:form id="myForm">

  <h1>Congratulation</h1>This is your new Page
    <apex:pageBlock >
            <apex:inputCheckbox id="chk" onclick="enable(this,'{!$Component.pageblock.btn}');">
        </apex:inputCheckbox>
        <apex:pageblockButtons id="pageblock" location="bottom">
            <apex:commandButton value="OK" id="btn" disabled = "true">
            </apex:commandButton>
        </apex:pageblockButtons>
       
       
    </apex:pageBlock>  
</apex:form>
</apex:page>
  • December 02, 2008
  • Like
  • 0
Hello All


I have custmize the Contact Tab. I have added a new section in Page Layout. In this Section I have used a self made S-Control. After making it a package, I found a problem that when i install it in an another account that section is not shown. I have checked that S-Control is there in the Package but i didn't find the layout.  Please Help me its really urgent


Thanks

Osman Ashraf Bajwah
Software Engineer
  • November 26, 2008
  • Like
  • 0
Hi,

I want to retrieve ultimate parent of each campaign.
E.g.
Campaign1
--- Campaign1.a
-------Campaign1.a.1

So the ultimate parent of Campaign1.a.1 is Campaign1.

I have developed following code which is working fine in small number of record but if I tried to update bulk records it gives "Too many SQL query" error.

public static String getUltimateParent(String pId) {
        Campaign[] campdata = [Select c.Id,c.ParentId From Campaign c where c.Id = :pId];

        if(campdata.size() > 0) {
            if(campdata[0].ParentId == null) {
                return campdata[0].Id;
            } else {
                return getUltimateParent(campdata[0].ParentId);
            }
        }
        return null;
    }

Any help?

I am writing a s control, in this scontrol i am invoking a web service. when i run it in my developer's account it runs fantastic but when i make the package and deploy it on any other account including developer i get an error msg:

 

{faultcode:'sf:INSUFFICIENT_ACCESS', faultstring:'CTCTEmailHistoryBO: no access allowed to this class.', }

 

 

Here is the javascript scontrol code:

<html> <head> <script type="text/javascript" src="/js/functions.js"></script> <script type="text/javascript" src="/soap/ajax/10.0/connection.js"></script> <script type="text/javascript" src="/soap/ajax/10.0/apex.js"></script> <script type = "text/javascript"> function getNextList(){ var pageCounter = document.getElementById('pageCounter'); pageCounter.value++; var id = '{!Contact.Id}' var sDiv = document.getElementById('sDiv'); sDiv.innerHTML = sforce.apex.execute('CTCTEmailHistoryBO','nextList',{arg:id,arg1:pageCounter.value}); } function getPrevList(){ var pageCounter = document.getElementById('pageCounter'); if(pageCounter.value >0){ pageCounter.value--; var id = '{!Contact.Id}' var sDiv = document.getElementById('sDiv'); sDiv.innerHTML = sforce.apex.execute('CTCTEmailHistoryBO','prevList',{arg:id,arg1:pageCounter.value}); }else{ alert("No Lists Found"); } } </script> </head> <body style="background-color:#F3F3EC"> <div width = "100%"align="center" id = "sDiv" > <input type="hidden" value="0" id="pageCounter" /> </div> <script type = "text/javascript"> try{ var pageCounter = document.getElementById('pageCounter'); var id = '{!Contact.Id}' var sDiv = document.getElementById('sDiv'); sDiv.innerHTML =sforce.apex.execute('CTCTEmailHistoryBO','getListHTML',{arg:id,arg1:pageCounter.value}); }catch(Error){ alert(Error); } </script> </body> </html>

 Its really urgent please help me

 

Osman Ashraf Bajwah

Technosoft

 

 

 

  • February 02, 2009
  • Like
  • 0
Hello All,

I have used a checkbox with some button. The button is disabled by default. when the checkbox is checked it should be enabled. otherwise not. i am facing some problems you may help me. Its really urgent.

I am attaching the code


<apex:page >
<script type="text/javascript">
   
    function enable(checkbox, btn){
        if(checkbox.checked){
            document.getElementById(btn).disabled = false;
         
        }else{
            document.getElementById(btn).disabled = true;
        }
    }

</script>
<apex:form id="myForm">

  <h1>Congratulation</h1>This is your new Page
    <apex:pageBlock >
            <apex:inputCheckbox id="chk" onclick="enable(this,'{!$Component.pageblock.btn}');">
        </apex:inputCheckbox>
        <apex:pageblockButtons id="pageblock" location="bottom">
            <apex:commandButton value="OK" id="btn" disabled = "true">
            </apex:commandButton>
        </apex:pageblockButtons>
       
       
    </apex:pageBlock>  
</apex:form>
</apex:page>
  • December 02, 2008
  • Like
  • 0
It's my belief that all of these recent threads on this board probably refer to the same problem that seems to have surfaced within the past week or so having to do with dynamic apex and packaging and perhaps the "API access restrictions" on packages. I'm experiencing all the problems described below in a class that references only a custom object that is included in the package. My experience with these problems is that they occur intermittently.


Schema.SObjectType.Contact.fields.getMap() and Managed Package

Schema.SObjectType.Contact.fields.getMap() and Managed Package

Schema.SObjectType.Opportunity.fields.getMap() Returns Empty Map

System.QueryException: object is not accessible in query due to package restrictions

More Dynamic Apex issues






Message Edited by mshelman on 10-15-2008 02:06 AM