• Richa K
  • NEWBIE
  • 150 Points
  • Member since 2010

  • Chatter
    Feed
  • 6
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 49
    Replies
Hi, I'm just studying the Creating On-Demand Applications (Salesforce_creating_on_demand_apps.pdf). There is one example given on page 145 "Try It Out: Defining a Sharing Rule for Review Records ". What is written there seems to be impossible. Review has a Master-Detail Relationship to Job Application. Now it should be possible to create a sharing settings for the Review object, so that also users from another public group have access. But I always see: "You cannot create sharing rules for this item." I guess, because it is dependent on the parent this is not possible, but I'm not sure. What's the problem?

I am new to force.com and want to practice SOQL queries . how to do that. Any editor?

Is there a way to add the leading 0 for single digit months using

 

string.valueOF(UNI.start_date__c.Month()

 

Currently, this returns 1 for January.. I would like it to return 01

 

Any help is greatly appreciated!!!!

 

Fred

  • January 27, 2012
  • Like
  • 0

Hi,

   I have an object C .Its has a filed called CProducer__c .That looks upto Producer Object. Producer__c has a field called Active( Checkbox set to false by default).

   Now I wanna toggle the value of checkbox to true(for the producer record, whose name is mentioned in C  record) , If An entry is made in C__c object with a particular producers name given in field CProducer__c.

 

Please help!!!!

Hi All

 

I have some input fileds in vf page where i can eneter values and i do not want users able to enetr decimals(us locale) or cammas( ,)[france locale)  how can i do it 

i tried to change the filed decimal length to zero and then user is able to enetr and upon saving it deletes 

but i do not want the user to enter at all 

 

  <apex:inputField value="{!wrapper.ocr.Total_Client_Spend__c}"  required="true" />

 

 <apex:inputField id="UnitPrice" value="{!wrapper.ocr.UnitPrice}"  required="true"/>

 

 

  • December 20, 2011
  • Like
  • 0



 

It is working working ap1 service endpoint but for na12 its giving above error..

Can someone help in this???

 

Thanks,

Neetika

  • September 07, 2011
  • Like
  • 0

Hello All,

 

We are going to implement SSO with federated IDs for our Salesforece org. I have couple of questions :

 

  - We need to implement it on just on Sandbox or just on production or both?

  - What basic steps I have to take in order to setup this?

 

Thanks in advance.

Hi All,

 

I need to get the new version of sObjects(Contacts) related to a Parent SObject(Account) in a map. I am doing like this :

 

trigger on Contact (before insert, before update) 
{
            set<Id> newConIds = new set<Id>();
            set<Id> newAccIds = new set<Id>();
            Map<Id,List<Contact>> MapAcc = new Map<Id,List<Contact>>();
            for(Contact c : Trigger.new)
            {
               newConIds.add(c.Id); 
               newAccIds.add(c.AccountId);
            }
            
            for(Account aa : 
[select Id,
(select Id,Title,LT_Last_Login_Date__c,Contact_Is_Primary__c,No_Of_Completed_Tasks__c from Contacts)
from Account where Id in : newAccIds]) { MapAcc.put(aa.Id,aa.Contacts); // Here I am getting the Old version of Contacts... Meaning, I am not getting the new values }

 

I want the map should have the new values of Contact records. Any suggestions?

I am using a custom controller(Not extension controller) for a VF page. That VF page has a lookup to Accounts. I want the selected lookup field value in my controller. I am using actionSupport for this(On change of lookup).

 

Any help?

I am using a custom controller(Not extension controller) for a VF page. That VF page has a lookup to Accounts. I want the selected lookup field value in my controller. I am using actionSupport for this(On change of lookup).

 

Any help?

Hi,

 

How can we let custom object records access as 'Create' and not 'Read'.

That means, you can create a record for a particular custom object but you cant view them.

 

Please advise.

Hi,

 

I am using document.referrer to get the URL of the previous page visited.

 

But IE has issues with document.referrer. Any one have any idea, how we can get the URL of the previous page in IE.

 

Thanks,

Shailesh

Hi everyone,

 

I have a normal pageblock table in my page. It shows data in a single column. I also do have checkbox bound to them.

 

For eg : original OP :

[]A
[]B

[]C

[]E

[] F

And desired one is :

 

[]A    []B      [] C
[]E   []F

 

 

 

 

Thanx and eagards,

Shailesh Patil

Now a days I am working on creating Sales-force custom object from platforms other than sales-force. We have a code sample for creating SF Custom object in Java. The idea that is going in my mind, is like, - If I created a WSDl from this Java class and if I created an Apex class using this WSDl, can I have the functionality to create the SF custom object from within the sales-force Apex Class only? If yes, what are the necessary steps that I need to take? Please guide.

Hi,

I have gone through the google data authentication example given in the API guide. But, I am unable to put all things to the proper place. Is there anyone who have successfully generated the sessionToken to use google API?

A code snippet would be of great use.

Hi,

I want to login to the salesforce via external program. To say in detail, I have to build a google gadget in which I have to put the Account names. Now, gadget code is executed in Google gadget's API. It will produce a URL and then we use that link in the visualforce page to show the gadget. I want to login to the salesforce through a javascript program and use the query results. Is there any way? I am kinda newbie to the salesforce.

 

Thank You!

Hi Guys,

I have a requirement where the user click on a button and then a Pop should open which displays the related records.

So basically i am using Output Panel for showing this Pop . As soon as user click the command Link, it calls a method in my Apex Classs and a query will return some values and i am displaying those results in the Pop up OutputPanel.

But the above process takes more time for opening the Popup as well closing the window.

Is there any other way by which we can achieve the above functionality ? For Example using angular js something like that ....

Please help . thanks ! 

 IN OPPORTUNTY WHENEVER THE STAGE IS 100% & CLOSED GO TO CORRESPONDING OPPORTUNITY LINE ITEM AND GET THE PRODUCT CODE AND GO THE PRODUCT OBJECT AND REDUCE THE STOCK FIELD BY THE QTY MENTIONED IN THE OPPORTUNITY LINE ITE
trigger insertCategoryScore on Opportunity (before Insert , before Update) {

    list<Opportunity> oppt = [select id, Name, StageName,Stage_Reason__c from Opportunity];
   
    List<RecordType> lstRecType = [Select Id, Name from RecordType where sObjectType = 'Opportunity'];
    //RecordType lstRecType[] = [Select Id, Name from RecordType where sObjectType = 'Opportunity'];
   
    for (Opportunity opp: oppt){
    for(RecordType rec:lstRecType){
     
     if(opp.StageName =='Active Low' && rec.name=='Business1') 
       opp.Stage_Reason__c = 'Waiting Approval';
       //upsert opp;
    }
    }
 
    insert oppt;
    
}


ERROR is:Invalid field update at line17
  • April 10, 2014
  • Like
  • 0

Hi,

 

My requirement is to add a new section at the bottom of the Calendar event edit page something like attendee section. Is it possible ?

 

Thanks 

Hi all, I am newbie to Apex coding and need a help regarding this . I'm trying to execute this but its showing a strange problem.

 

The moment i access chkLead.Z_Sales_Office_Code__c the value becomes null. I've used debug statements to prove it, Here1 returns a value but Here 2 the value is null.

 

Is there any other way to achieve this ?

 

 

for(Lead chkLead :currentLeadList){
Decimal Flag=0;
//system.debug('Here 1--------'+salesRepUserIdMap.get(chkLead));
//chkLead.Z_Sales_Office_Code__c=salesRepUserIdMap.get(chkLead);
//system.debug('Here 2--------'+salesRepUserIdMap.get(chkLead));
for(Z_Sales_Office_Code_Default__c teamAssRec: teamAssignList){

if(salesRepUserIdMap.get(chkLead)==teamAssRec.name && teamAssRec.Z_Sales_Office_Type__c=='REN'){
if(chkLead.z_product_type__c=='Display'){
chkLead.OwnerId=displaySalesMap.get( salesRepUserIdMap.get(chkLead));
Flag=1;
}
else{
chkLead.OwnerId=semiSalesMap.get( salesRepUserIdMap.get(chkLead));
Flag=1;
}

}

 

 

 

Thanks a lot

I am using a custom controller(Not extension controller) for a VF page. That VF page has a lookup to Accounts. I want the selected lookup field value in my controller. I am using actionSupport for this(On change of lookup).

 

Any help?

I am using a custom controller(Not extension controller) for a VF page. That VF page has a lookup to Accounts. I want the selected lookup field value in my controller. I am using actionSupport for this(On change of lookup).

 

Any help?

Hi,

 

I got assistance creating my trigger and now I find out that it needs to be tested in order to be uploaded to production.  The trigger is designed to auto-populate the Opportunity_Contact__c field, with the Contact that has been designated as the Renewal Owner, when a record is originally created only.  Any assistance would be greatly appreciated.

 

trigger setRenewalOwnerContact on Opportunity (before insert) {

 

 List<Opportunity > optylist = Trigger.new; 
  for ( Opportunity opty : optylist ) {
   if (opty.Opportunity_Contact__c == null) {
    for (List<Contact> contactlist : [SELECT id FROM Contact WHERE Accountid = :opty.Accountid AND Contact_Type__c = 'Renewal Owner' LIMIT 1]) { 
     for(Contact con : contactlist ) {
        opty.Opportunity_Contact__c = con.id;
     }
    }
   }
  }
  
}

 Regards,

 

Alex

Hi,

Please help me on this URL overriding

{!IF(ISPICKVAL(Opportunity.Forecast_Type__c,"Ship Date Specific"),
'/{!Opportunity.Id}/e?clone=1&retURL=%2F{!Opportunity.Id}&00N80000004eYzp={!Opportunity.Id}&00N80000004eZ0S=false&00N80000004eZ0u= &opp9={!TODAY()}',
'/{!Opportunity.Id}/e?clone=1&retURL=%2F{!Opportunity.Id}&00N80000004eYzp={!Opportunity.Id}&00N80000004eZ0S=false')}

 trying to clone the opportunity depending on the pick list value, using custome button

it saved but when i click the button it show URL No Longal EXISTS,

 

Thanks

I am in Windows 7 on a 64-bit laptop. When trying to install the Force.com IDE plugin from eclipse I got several messages that said,"MD5 hash not as expected. Expected...... and found......." Any Idea what that is about, or what to do about it?

 

Thanks,

Chuck

Hi, I'm just studying the Creating On-Demand Applications (Salesforce_creating_on_demand_apps.pdf). There is one example given on page 145 "Try It Out: Defining a Sharing Rule for Review Records ". What is written there seems to be impossible. Review has a Master-Detail Relationship to Job Application. Now it should be possible to create a sharing settings for the Review object, so that also users from another public group have access. But I always see: "You cannot create sharing rules for this item." I guess, because it is dependent on the parent this is not possible, but I'm not sure. What's the problem?

I am new to force.com and want to practice SOQL queries . how to do that. Any editor?

Hi,

 

I have the requirement like every day i have to update or insert some thousands of records in a csv or excel file.

By using Scheduling apex class. Is there any way to do it.

 

If it is please send me the code.....Very Very Urgent..

 

 

Thanks in advance.

  • February 17, 2012
  • Like
  • 0
String assesment_query = 'SELECT a,b,c,d,e,f,g,h,i,j'+ 
+'FROM Assesment__c WHERE Candidate__c IN '													+'(SELECT Candidate_Contact__c '+																		+'FROM Application__c '+																		+'WHERE Job__c =:'+JobOrder+' '+																		+'AND Stage__c =:'+offer+')'+
		        +' AND RecordTypeId =:'+ProfileId+';';
List<Assesment__c> assesment = Database.query(assesment_query);

 Hi all,

 

I have the code above and gives me this error:

 

System.QueryException: unexpected token: WHERE 

 If I execute this directly (eg.: List<Assessment__c> assessment = [the query here]; Works perfectly.

 

In the string query:

JobOrder is an ID.

offer is a String.

ProfileId is an ID.

 

Does anyone knows why this happens?. Do you know of any solution?

 

Thank you!,

 

MGA

Hi , 

My requirement is , i need to dispaly the current time, and depending on the current time 

i should be able to display previous 30 minutes ,previous 1 hour ,previous 2 hours to the current time and disaplay them in 

a dropdown ,

 

for eaxmple:

if the current time is 9:00 in the drop down i should be able to dispaly 

8:30 and 8:00 and 7:00 so on and it should alter depending upon the current itme

could anyone could help me with an example how would i achieve this

 

Thank You

HI,

my requirement is to upload a file and once the file is uploaded,

i must be able to view the content of the uploaded file.could

anyone help me with an example or a sample code how could i

achieve this...

 

Thank you.