• Sridhar Bonagiri
  • NEWBIE
  • 354 Points
  • Member since 2009

  • Chatter
    Feed
  • 13
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 282
    Replies

If we want to fix a bug and we r in a screen and we need to find the classes & page that is using it.

How to find it.

Thanks

Sai

What does it cost to host an app in appexchange?

Hi,

I want to persue my career as Salesforce developer. I have a prior knowledge of C, C++. Could any one please let me know on how to start and from where to start. I have downloaded all materials and also started Salesforce workbook. But still I feel directionless. Can any one guide me with sequence of action I need to follow. I want to have decent knowledge in a period of 6 months time. Further, I am devoting 2 hrs a day for it.

  • January 23, 2013
  • Like
  • 0

I am trying to Run Schedule job........but Schedulable class has jobs pending or in progress? This Error is occurs again and again, i have deleted the scheduler class and tried again still same problem occurs if have any suggetions please let me know...... here is my scheduler class for send Emails to employee on his birth day :-

 

global class BirthdayMailSend implements Schedulable
{
    global void execute (SchedulableContext ctx)
    {
    Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();    
    for ( Employee__c emp : [SELECT Id, Name,email__c,First_Name__c FROM Employee__c WHERE Birth_date__c = TODAY] )
    {
     mail.setSubject('New Employee Record Created..!');
     mail.setHtmlBody('Hello'+emp.First_Name__c+'!<br/>today is your birth day bhikarya cake kap nahi tar muskadin');
     mail.setToAddresses(new String[] {emp.email__c});
     Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });        
    }
    BirthdayMailSend mc = new BirthdayMailSend();
    String sch = '0 0,1 * * * *';
    system.schedule('Birthdaymail', sch, mc);
    }
}

Every one class maintained test code coverage is 75%..totally for all classes how much maintain test code coverage in org..can any one tell me please

 

 

Thanks,

Munna

  • January 21, 2013
  • Like
  • 0

i have a class in dev org with code is

 

name of class is ManageRules.cls

 

/**
* This class is used for creating and editing Rule
**/

public with sharing class ManageRules{
public Rule__c newrule {get;set;}
public String objType {get;set;}
public string SearchEvalRule {get;set;}
public string Descr {get;set;}
public List<SelectOption> objOptions {get;set;}
// public String descr {get;set;}
public boolean edit {get;set;}
String ruleId;

public ManageRules(Apexpages.StandardController stdcon){
ruleId = stdcon.getId();
newrule = new Rule__c();
objOptions = new List<SelectOption>();

edit=false;
/**
* Add standard Objects
*/
objOptions.add(new SelectOption('',''));
objOptions.add(new SelectOption('Account','Account'));
objOptions.add(new SelectOption('Contact','Contact'));
objOptions.add(new SelectOption('Opportunity','Opportunity'));
objOptions.add(new SelectOption('Case','Case'));
objOptions.add(new SelectOption('Lead','Lead'));
objOptions.add(new SelectOption('Campaign','Campaign'));
objOptions.add(new SelectOption('Quote','Quote'));
objOptions.add(new SelectOption('Product2','Product'));
//objOptions.add(new SelectOption('ForeCast','Forecast'));

Map<String, Schema.SObjectType> mapObj = Schema.getGlobalDescribe();
for(String objname:mapObj.keySet()){
Schema.SObjectType sobj = mapObj.get(objname);
Schema.DescribeSObjectResult descRes = sobj.getDescribe();
/**
* Add custom objects
*/
if(descRes.isCustom() && !descRes.isCustomSetting()){
String objLabel = descRes.getLabel();
objOptions.add(new SelectOption(objName,objLabel));
}
}

/* Edit Rule */
if(ruleId!=null){
edit=true;
newrule = [select name,object__c,Rule_Execution_Plan__c,Available__c,Evaluation_Rule__c,Description__c from rule__c where id=:ruleId];
if(newrule!=null){
objtype=newrule.object__c;
Descr =newrule.Description__c;
SearchEvalRule =newrule.Evaluation_Rule__c ;

}
}

}

Public List<SelectOption> getEvalRule() {

List<selectOption> options = new List<selectOption>();
options.add(new selectOption('', '- None -'));
Schema.DescribeFieldResult field = Rule__c.Evaluation_Rule__c.getDescribe();
for (Schema.Picklistentry picklistEntry : field.getPicklistValues())
{
options.add(new SelectOption(pickListEntry.getValue(),pickListEntry.getLabel()));
}
return options;

}
public PageReference saveRule(){
newrule.object__c = objtype;
newrule.Evaluation_Rule__c=SearchEvalRule;
newrule.Description__c= Descr;

try{
Database.upsert(newrule);
return(new PageReference('/'+newrule.id));
}
catch(Exception e){
ApexPages.Message msg = new ApexPages.Message(ApexPages.severity.Error,e.getDMLMessage(0));
ApexPages.addMessage(msg);
return null;
}

}

public PageReference saveAndNewRule(){
newrule.object__c = objtype;
newrule.Evaluation_Rule__c=SearchEvalRule;
newrule.Description__c= Descr;
edit=false;
try{
Database.upsert(newrule);
newrule = new Rule__c();
return(new PageReference('/apex/manageRules'));
}
catch(Exception e){
ApexPages.Message msg = new ApexPages.Message(ApexPages.severity.Error,e.getDMLMessage(0));
ApexPages.addMessage(msg);
return null;
}

}


}

 

 

i created an object its giving me error

 

Description Resource Path Location Type
Save error: Rule__c : managerules does not exist or is not a valid override for action Edit. Rule__c.object /RuleCriteria/src/objects line 0 Force.com save problem

 

my Rule__c object code segment is

 

<actionOverrides>
<actionName>Edit</actionName>
<content>ManageRules</content>
<skipRecordTypeSelect>false</skipRecordTypeSelect>
<type>Visualforce</type>
</actionOverrides>

 

i am unable to figure why its showing me this error its an existing project so i have to deploy it on my dev org .on others org its working perfectly fine.i first i remove actionOverride tag from object and save it to my org then i save class code it is also working fine and after that i add this code segment in my object code  and then try to save this object code and getting this error.can any one please how to resolve this issue??

 

I am new to developer force.com ......I Had one problem while developing an Recrutingapplication in developer force.com

         

                                    Requirement is:-

             

                                                                 I need to have a Registration Form and Login page how can I develop those Forms ?

 

i am trying to create a new remote access as per the intergration_workbook.pdf can any body tell me why the remote access page is redirecting to apps page,
and remote access page is not showing new button to create new remote access for an application 
please hlp me
thanking u for ur assistance

  • January 16, 2013
  • Like
  • 0

Hi Team,

 

I have a Total Volume field in A object, through visual force page i am using this in B object(I dont have total volume field in B object).

 

Now i want create a formula field for Total volume (A+B).

 

Can any one help me here.

 

Thanks in advnace.

  • January 15, 2013
  • Like
  • 0

Hi Guys

 

I got this error when i tray to deploy a small triger i created, seem works fine in sanbox

any ideas

 

The code is:

 

1
2
3
4
5
6
7
8
9
10

trigger Update_region on Account (before insert, before update) {
for (Account a : Trigger.new) {
  Region__c[] rgs = [Select Id, state__c From Region__c Where postal_code__c =:a.BillingPostalCode Limit 1];
  if (rgs.size()!=0){
        a.Region__c = rgs[0].Id;
        a.Post_code_del__c = rgs[0].state__c;
         }
        
     }
 }

Thanks in advance

Hi,

 

Code coverage issue.

 

when i run all test  from setup-->develop-->apex classes  its show 76% code coverage.

but when i go to make new package.

I add all apex class and  pages, tabs,buttons in package.

and when i go for upload this package its show error you can not upload this package code coverage is 12%

 

so please suggest why this happen its show 76% code coverage when i run all test from apex class.

 

so give solution.

 

Thanks

Prashant

 

hi friends,

 

                one of my frnd asked me is there any difference between trail version of salesforce which is www.salesforce.com or enterprise edition of salesforce which is www.developerforce.com,

                i told one of the difference which is trail version will be expired with in 30 days..enterprise edition will not be expired..

plese tell me is there any other differences regarding limitations of the classes or objects...please give the reply 

 

 

Hi,

We are planning to develop a OEM appliation, which we do not want to list it on AppExchange, still do we need to pass the security review for this app.

Regards,
Sridhar Bonagiri

Hi,

 

How can I access a field from a managed package which exists in client org?

 

I need to access this filed from development org. How can I achieve this?

 

Regards,

Sridhar Bonagiri

 

Hi All,

 

As per salesforce.com Winter'12 release  now 'Total number of SOQL queries issued is 200 instead of 100' , but when I checked the debug logs it is still counting for 100 only.

 

Any body any idea ??

 

Thanks in advance

 

Sridhar Bonagiri.

Can anybody explain me what is siteforce.

Hi,

 

How can I display all the fields and their datatypes of a particular object,

is there any code available to do this.

 

Thanks in advance.

Hi All,

 

How can I find out Id of a particular report , which is created from a custom report type.

 

 

Thanks,

Sridhar 

Hi All,

 

I need to call a pagereference method of other class from the finish method of batchapex class.

 

is it possible to call.

 

Sridhar B.

Hi All,

 

I have requirement to export around 30,000 records to excel,

how can i achieve this through apex and visual force page.

 

thanks in advance.

 

Sridhar B.

Message Edited by BSridhar on 03-04-2010 12:05 AM

Hello All,

 

I have a basic question , want to find out the what is the maximum number of items we can include in a picklist.

 

thanks in advance.

 

 

Hi All,

 

I have tasks object , which has two recordtypes, my question is , when ever a user presses a new button on home tab of this object, he should be redirected to one recordtype only.

 

how to do this.

 

 

Hi,

 

I have  couple tabs which displays the related lists of the corresponding objects which are related to the first tab object.

 

when I selected a record in the related of any tab for edit , it takes me to native edit functionality , once edit is done there , i wanted to come back to the same tab from which I selected the record.

 

is there any way to add parameters to url .

 

 

Hi All,

 

I have records in contacts object which are having  two types of 'contact type' like 'CEO'  and 'Manager',

 

 

i don't want users to delete the contact records which are of  'CEO' , this can be achieved through trigger, but i want to show custom message in the page.

 

how can this achieved. 

 

thanks in advance.

I need help in finding out  whether trigger.old has got values or not.

 

How can i find out currentpage url through apex.
This component works but does not validate and gives the following error message:
Step not yet complete... here's what's wrong: 
The CSS does not contain a reference to the background image 
Note: you may run into errors if you've skipped previous steps.
I am trying to find the carriage return in case description field.  I used these formula listed below. Everytime it returns zero.
Any ideas how I can find the line break?
Both of these items below return zero. There is definetely a line break in my description field
FIND('\r',  Description,1 )
FIND('\n',Description,1 )
Hi 
i have a scnario:3 fields (data type:Text) First Name,Middle Name,Last Name, if any Duplicate record is going to be created with same values in those three fields, that operation should fail by throwing an error,Is there any possible way to achieve this,through (UI configuration or trigger),
I wonder..how to compare text fields that too 3 Text fields.
hello every one,

will any body know about the vf pag to water mark . can any one explain the procedure please
Thanks,

 
  • March 30, 2015
  • Like
  • 0
Hi All ,
            I have a Requirement to Download the Visualforce Page as PDF When click on CommandButton


Here I have 2 - Visualforce Pages i have placed a Command Button in One of the Visualforce page when i click on this button the other visualforce page will Download as a PDF without pageredirection


Plese give me a Solution and Thanks in advance...
  • September 09, 2014
  • Like
  • 0
So, we uploaded the managed package and installed it in a new org (as the clients would) but when accessing a vf page we get the error

SObject row was retrieved via SOQL without querying the requested field: namespace_MyObject_c.namespace_CustomField_c
The problem is that on the previous org everything works fine and on that VF Page we are not actually referencing any value that was the result of a query.

Any idea why this is happening?  We checked the namespace but when we changed it in the development org, it gave us an error.
Hello Team,

We have couple of questions for submitting app in app exchange

1. After submitting the App for getting the security Review, what is next?

2. What are all the steps involved in assigning a license to a customer?

3. When do we upload the marketing material to our app-exchange listing?

4. When a potential customer asks for a trial - should the customer contact us before they install and start using it?

5. Do we need a copy of license for the customer to sign and start using it.

~Nirmal
How can I delete all the records of a custom object in Developer Edition?

Hi,

 

How can I access a field from a managed package which exists in client org?

 

I need to access this filed from development org. How can I achieve this?

 

Regards,

Sridhar Bonagiri

I clicked on Reset Security Token in my salesforce account about 3-4 times today but I have not yet received the security token on my email. I have also checked my Junk folder. What could be the problem?

Hi Guys,

 

We got an error that our code not Enforced SF CRUD and FLS(http://wiki.developerforce.com/index.php?title=Enforcing_CRUD_And_FLS) from Checkmarx report. we could not found anything wrrong in the code. please help me to resolve this issue,

---------------------------------------------
public class DefaultValues
{
public void SetDefaultValues()
{
if(Account.sObjectType.getDescribe().isCreateable())

if (Schema.sObjectType.Account.fields.Name.isCreateable() &&Schema.sObjectType.Account.fields.Description__c.isCreateable() && Schema.sObjectType.Account.fields.ObjectType__c.isCreateable() && Schema.sObjectType.Account.fields.EnabledStatus__c.isCreateable() )
{
List<Account> ListAccont=new List<Account>();
Account ObjAccountExact=new Account();
ObjAccountExact.Name='1st Pass - Strict';
ObjAccountExact.Description__c='Acct Name, Phone & City Exact';
ObjAccountExact.ObjectType__c='account';
ObjAccountExact.EnabledStatus__c='false';
ListAccont.Add(ObjAccountExact);
insert ListAccont;

}
}

}

 

I'm trying to deploy a new version of a package into a dev org and I'm getting the error: "The requested package does not exist or has been deleted. Please contact the package publisher for assistance. If this is a recently uploaded package, please try again soon."  I created the package over an hour ago, and I'm still getting this error - I was able to deploy earlier this morning, so this appears to be new.

Hi i have enabled partnerportal for my organistaion and  when i logged in with goldpartner user and try to assign a task to standard user , its not showing users list in the lookup and when i search with name its giving the following popup' 

You don't have permission to see any of the records in the partner lookup filter ?

 

any idea.?

 

 

Thanks

How many dashboard components we can use in one dashboard?

Hi,

 

I want to display my data row wise in tables on visualforce page.

 

I have tried with following code but it is giving me output columnwise.

 

<apex:page standardController="Account">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection columns="3">
<apex:pageBlockTable value="{!Account}" var="myUser" id="table1" width="200">
     <apex:column value="{!myUser.Name}" />
     <apex:column value="{!myUser.Phone}" />
     <apex:column value="{!myUser.Name}" />
</apex:pageBlockTable>

<apex:pageBlockTable value="{!Account}" var="myUser" id="table2" columnsWidth="20">
     <apex:column value="{!myUser.Name}" />
     <apex:column value="{!myUser.Phone}" />
     <apex:column value="{!myUser.Name}" />
</apex:pageBlockTable>

<apex:pageBlockTable value="{!Account}" var="myUser" id="table3" columnsWidth="20">
     <apex:column value="{!myUser.Name}" />
     <apex:column value="{!myUser.Phone}" />
     <apex:column value="{!myUser.Name}" />
      
</apex:pageBlockTable>

<apex:pageBlockTable value="{!Account}" var="myUser" id="table4" columnsWidth="20">
     <apex:column value="{!myUser.Name}" />
     <apex:column value="{!myUser.Phone}" />
     <apex:column value="{!myUser.Name}" />
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

Kindly Help

 

Regards,

Mayur

 

If we want to fix a bug and we r in a screen and we need to find the classes & page that is using it.

How to find it.

Thanks

Sai

 I have a visual force page,

 

I created a serach button in visual force page,the serach button return some records into pageblock table,i want to display CSV link to download the serch results any one can please suggest me on this 

 

it would be great helpfull.

 

Thanks In Adavace

Hi Guys,

 

Please I need some help regarding the force.com secutiry review.

 

We have an application which we sent for security review.... the application is completly based on force.com and do not have

any other integration...

 

We did run the chexmax report and it did not receive any Vulnerability messages and was clean..

 

now we have recived the feedback and have 3 major problems could you please help me with the same

 

below are the 3 problem, how can i overcome them..

 

1. DOM based XSS Vulnerability

Code

           if (desc.length > 0){
                tdesc = "<span class='desc'>" + unescape(desc) + "</span>"; 
           }
           if (cmt.length > 0){
                tcmt = "<span class='h'>Comment</span><span class='cmt'>" + unescape(cmt) + "</span>"; 
           }
           title = tdesc + tcmt;
           return title;

File

Winscope_MVPs.page

Notes

Data from custom object is written into the DOM and then placed, via js, into an html execution context. 

How can overcome the above problem in the page.

 

2. FLS Create Vulnerability

Code

Line 77:         edit = true;
Line 78:         
Line 79:         ap = new Action_Plan__c(Opportunity__c=oppId, From__c=fromModule, Who__c=UserInfo.getUserId(),Related_Record_ID__c=recId);
Line 80:         if (recId==null) ap.Winscope_Page__c = WinscopePage; //Action added from respective module page
Line 81:     }//End of WS_AddActionCon
Line 82: 
Line 83:     public void saveAction() {


 

What can be done to pass the review in above case....

 

3. URL Redirection Attack Vulnerability

 

Code

Line 133:     }
Line 134:     
Line 135:     public pageReference backToAction(){
Line 136:         String PageName = apexPages.currentPage().getParameters().get('pageName');    
Line 137:         PageReference pg = new pageReference(PageName);
Line 138:         pg.setRedirect(true);
Line 139:         return pg;

 

 

Please guys I am looking into it but if you could please let me know what is the Vulnerability and how it can be fixed.

 

Awaiting your reply guys thanks.

Hello,

I have the following VF page

<apex:page standardController="Call__c" recordSetVar="call" extensions="CallSetExt" action="{!removeAndRedirect}"></apex:page>

and the controller as follows

public with sharing class CallSetExt {

    private ApexPages.StandardSetController con;
    public CallSetExt(ApexPages.StandardSetController controller) {
        con = controller;
    }
    public PageReference removeAndRedirect()
    {
        delete con.getSelected();
        return new PageReference(ApexPages.currentPage().getParameters().get('retURL'));
    }
    public PageReference callPlanRedirect()
    {
        return (new PageReference('/apex/CallPlanning'));
    }
    public PageReference callReDirect()
    {
        return (new PageReference('/apex/CallPage1'));
    }

}

 

 When I try scanning my code for the security review, I get Cross Site Reference Forgery error for the above page.

Can anyone please help on how should I enforce Cross Site Reference Forgery in the above VF page? I saw the examples salesforce gave but i couldn't apply it to my case.

 

Thanks in advance,

Siim

 

 

  • August 15, 2011
  • Like
  • 0