• manojjain4328
  • NEWBIE
  • 0 Points
  • Member since 2010

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

Hello all,

 

We have writing an application where client has also requested us to provide with User level access to the application. However, they are also able to access the source code of the apex classes, visual force pages, etc. They are only able to view and NOT edit/modify. But we intent to even disable access to View these apex classes for non System Admins. How do we disable them access to these source code?  

 

Thanks,

Sagar 

Hi;

 

I have mentioned two functions:

 

1)getAllCompensationPlan_CustomObj

2)getAllCompensationPlan_StdObj

 

I received error while compiling "getAllCompensationPlan_CustomObj"  function and second one compiled successfully without any error.

 

Both funtions perform  same operation , there is only one difference one contains standard object like(Account,Contacts) while other contains custom object(CompanesationPlan__c,JobTitle__c).

 

Is there any other method to write same query for custom objects.

 

This functions return the list of selected values which further used to poulate datagrid in flex .

 

I have mentioned functions below.

 

PLEASE HELP ME 

 

  

 

webService static List<Compensation__c> getAllCompensationsPlan_CustomObj()

{

         List<Compensation__c> compplan = [select id,name,(SELECT FirstName, LastName from JobTitle__c LIMIT 1) from              Compensation__c];

          return compplan; 

 

} 

 

 

webService static List<Account> getAllCompensationsPlan_StdObj()

{

         List<Account> compplan = [select id,name,(SELECT FirstName, LastName from Contacts LIMIT 1) from Account];

         return compplan;

    }

 

 

REGARDS,

MANOJ JAIN 

 

Hi all,

       

I have developed apex web service class  which is further used by the flex page for insert ,update,delete,update in Salesforce.

My question is for if i want to deploy my application in appexchange then i need to write test class and method for my apex code.

So that i could deploy my application into Appexchange.

 Please guide me what should be the suitable test class code for my web service class.

I have mentioned sample code for my web service class below:

 

global class Questions

{


webService static List<QuestionType__c> getQuestionType(Id id)
{
List<QuestionType__c> qType = [select id, name, Name__c, Summary__c from QuestionType__c where id = :smileysad:id) ];
return qType;
}
webService static List<QuestionType__c> getAllQuestionType()
{
List<QuestionType__c> qType = [select id, name, Name__c, Summary__c from QuestionType__c LIMIT 50];
return qType;
}
webService static Id insertQuestionType(QuestionType__c qType)
{
insert qType;
return qType.Id;
}
webService static Id updateQuestionType(QuestionType__c qType)
{
update qType;
return qType.Id;
}
webService static Id deleteQuestionType(Id id)
{
QuestionType__c[] removeQType = [select id, name, Name__c, Summary__c from QuestionType__c where id = :smileysad:id)];
String returnVar = removeQType[0].id;
delete removeQType;
return returnVar;
}
}

 

Regards,

Manoj Jain 

 

 
24-2010 12:12 AM

Hi all,

 

I want to pass optional/default parameter in apex method,same as java.

But it throws error.

 

Is there any special way to pass optional/default parameter in apex method?

 

Please help me.

 

Regards,

Manoj Jain 

 
03-19-2010 04:21 PM

Hi all,

 

I want to pass optional/default parameter in apex method,same as java.

But it throws error.

 

Is there any special way to pass optional/default parameter in apex method?

 

Please help me.

 

Regards,

Manoj Jain 

Hi,

 

I am trying to implement initial Helloworld webservice in Salesforce.

But i got error:

 

"Web service callout failed: WebService returned a SOAP Fault: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session faultcode=sf:INVALID_SESSION_ID faultactor="

 

 

After that i have tried to write login() method for getting valid session id so i took reference of sample java method

 

Sample Code—Java

 

privateboolean login()

{

LoginResult loginResult = null;

SoapBindingStubbinding = null;

try {

// Createbinding object

binding = (SoapBindingStub) new SforceServiceLocator().getSoap(); // login

 

loginResult =binding.login("username", "password");

    }

catch (Exception ex){

System.out.println("An unexpected errorhas occurred." + ex.getMessage());

return false;

}System.out.println("Login was successful.");

 

// Resetthe SOAP endpoint to the returned server URL

 

binding._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, loginResult.getServerUrl());



// Createa new session header object // add the session ID returned from thelogin

 

_SessionHeader sh = new _SessionHeader(); sh.setSessionId(loginResult.getSessionId());

// Set the sessionheader for subsequent call authentication

 

binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(),

"SessionHeader",sh);

 

//get user info

 

try {

GetUserInfoResultuserInfo = binding.getUserInfo(); }

 

catch (Exception ex) {

System.out.println("Anunexpected error has occurred." + ex.getMessage()); returnfalse;

}return true;

}

 

 

But when i tried to implement this same code in Apex i got many error bcoz it is in java .

I just want to know hoe can we write login method in Apex so tat could get valid session id to implement my webservice.

 

Regards

Manoj 

 

 

 

 

Hi All,

 

I got Invalid session id error during invocation of webservice.

Please help me so that i could resolve this issue and move forward.

 

Error:

 

Web service callout failed: WebService returned a SOAP Fault: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session faultcode=sf:INVALID_SESSION_ID faultactor=

 

Regards,

Manoj jain 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Hi All,

 

I am developing my frirst salesforce project. 

I need clear idea about folowing points:

 

1. where should i start means first i should write apex code or design visual force pages .

2. Whether I should go for force.com IDE or Salesforce development environment.

 

If someone have basic beginner documentation of any salesforce project if would be really helpful for me.

I want to develop fully customized salesforce project whose object's look and feel and flow is totally different from standard salesforce object.

 

Please guide me so that i can able to make great application. 

 

Regards,

Manoj Jain 

Hi,

 

I need some tutorial to understand visualforce pages and tags.

If someone have this ind of tutorial please forward me on

 

manoj.jain4328@gmail.com

 

This would be really helpful for me.

 

Regards,

Manoj Jain

Hi,

 

When i have tried to login into force.com ide in eclipse environment i got one warning message

 

"Warning: Warning: forcecom require on organization with te meta data api enabled.API is not enabled for this organizatin or partner"

 

Please help me  to enable the meta data api.I dont know from where it should be enable.

 

Regards,

Manoj Jain

 

Hi,

 

When i have tried to login into force.com ide in eclipse environment i got one warning message

 

"Warning: Warning: forcecom require on organization with te meta data api enabled.API is not enabled for this organizatin or partner"

 

Please help me  to enable the meta data api.I dont know from where it should be enable.

 

Regards,

Manoj Jain

 

 

 

 

Hello SForce Family Members,
 

I am Manoj Jain new member of sforce family.

I am facing one problem and i need your help.

I have added salesforce plugin successfully in eclipse,but when i am trying to create new force project its now allowing me to do the same.

Everytime i got same error invalid username password,security tocken or may be you are locked.

I have already resetted my security tocken thrice but no success.Currently i am using trial version of salesforce.

Please help me regarding this issue.

 

Thanks & Regards,

 Manoj Jain

 

 

 

 

 

Hello SForce Family Members,

 

 

I am Manoj Jain new member of sforce family.

I am facing one problem and i need your help.

I have added salesforce plugin successfully in eclipse,but when i am trying to create new force project its now allowing me to do the same.

Everytime i got same error invalid username password,security tocken or may be you are locked.

I have already resetted my security tocken thrice but no success.Currently i am using trial version of salesforce.

Please help me regarding this issue.

 

Thanks & Regards,

Manoj Jain 

Hi,

 

When i have tried to login into force.com ide in eclipse environment i got one warning message

 

"Warning: Warning: forcecom require on organization with te meta data api enabled.API is not enabled for this organizatin or partner"

 

Please help me  to enable the meta data api.I dont know from where it should be enable.

 

Regards,

Manoj Jain

 

Hello SForce Family Members,
 

I am Manoj Jain new member of sforce family.

I am facing one problem and i need your help.

I have added salesforce plugin successfully in eclipse,but when i am trying to create new force project its now allowing me to do the same.

Everytime i got same error invalid username password,security tocken or may be you are locked.

I have already resetted my security tocken thrice but no success.Currently i am using trial version of salesforce.

Please help me regarding this issue.

 

Thanks & Regards,

 Manoj Jain