• Naveen Rahul 26
  • 10 Points
  • Member since 2017

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 12
HI All,
 I have an object that is lead one in that I need to count the lead picklist values. let say we have 100 records in the lead , 10 records status are lead = open, another 10 are closed like this I need to display using soql.

Thanks & Regards

I am trying to add additional logic to an existing button on a Custom Object and I get the error saying Unexpected Token. Here is the code, I am trying to add. Here OrderApi__Receipt__c.OrderApi__Balance__c is the Formula field of type Currency. I did try adding $ before 0, but it still gave the same error.

else if({!OrderApi__Receipt__c.OrderApi__Is_Refund__c}&&{!OrderApi__Receipt__c.OrderApi__Balance__c} =0.00){ 
alert('Refund processed. DO you wish to continue'); 
}else if({!OrderApi__Receipt__c.OrderApi__Is_Refund__c}) { 
//alert('in refund loop'); 

  • June 04, 2017
  • Like
  • 0
I have three community 
1) a
2) b
3) c

I want to create user from apex that have either access community a or b or c or a,b or a,b,c 
mean base on selection to create user.

User-added imagePlease see atchment .


i am trying to create a new field on all contacts that pulls from a picklist of 3 different options that is currently on the account side. i am just trying to create a formula that will pull the word "prospect, active, or inactive" and put it on the contact. so on the account side under account information there is the "Type" of company with three options prospect, active, inactive. i cannot seem to create a formula that will pull this informantion and put it on the contact side. any thoughts?
I'm generating a pdf letter in a vf page and am tripping on a very simple thing...

If the field giftAmount, which is passed in from apex as say $2,500.00 is over 1000, I want to sign the lettter Sonja, otherwise I'd like to sign it Karen.

How do I do this in VF?

Current Code - gives generic "Syntax Error" message
{!IF( Value({!giftAmount}) >= 1000, "Sonja", "Karen")}

Thanks for the help...

If click on the back button on Browser then the previous page is loaded which shoul not be happen. So, what should I do hence i can manage sesion.
I wrote a trigger that updates 4 fields into account that are related... our customization makes that we have Billing and Shipping accounts, so the shipping account has a lookup field that relates this shipping account to the billing account, so that this trigger does is basically change this 4 fields in all these relate accounts automatically.
In general, this trigger is working well, but I'm receiving the error when there are 30 - 40 accounts associated with this Billing account. How can I fix this issue?
trigger AccountUpdateTerms on Account (before update, after update) {

    Map<Id, Account> acc = new Map<Id, Account>();
    acc = trigger.oldMap;
    for(account newacc : trigger.new){
        if(newacc.Credit_Hold__c != acc.get(newacc.Id).Credit_Hold__c || newacc.Payment_Terms__c != acc.get(newacc.Id).Payment_Terms__c ||
           newacc.Price_Level__c != acc.get(newacc.Id).Price_Level__c){
           List<Account> accupd = new List<Account>();
           accupd = [SELECT Id,Company_Code__c,Bill_To_Account__c,Credit_Hold__c,Payment_Terms__c FROM Account WHERE Bill_To_Account__c =: newacc.Id ]; 
           if(trigger.isBefore && accupd.size() >0){
               for(account upd : accupd){
                   upd.ByPass_Validation_Rules__c= TRUE;
               update accupd;
           if(trigger.isAfter && accupd.size() >0){
               for(account upd : accupd){
                    upd.Company_Code__c = newacc.Company_Code__c;
                    upd.Credit_Hold__c = newacc.Credit_Hold__c;
                    upd.Payment_Terms__c = newacc.Payment_Terms__c;
                    upd.Price_Level__c= newacc.Price_Level__c;   
               update accupd;


I have a custom button on the Event to open a pdf with info from event and related task notes. I need to recreate it as an OnClick JavaScript, so that if the Event field '"Approved by:" is blank they receive an alert, but I cannot seem to get to right. I have tried several different senarios and keep getting different errors.


IF(ISPICKVAL(!Event.Approved_by__c, "NULL")){ 
   alert("Pre Meeting Notes Need to be Approved First");
    window.location = 'apex/EventMeetingNotes';
Hi guys,

I would like to ask how to recognize the input string is Chinese input method (when using Microsoft pinyin) and convert it to English input method ? For example: in English input method:abcd12345 , in Chinese input method:abcd12345. These two are not the same ascii actually and so at backend I need to convert Chinese input method to English input method. Is there any method to solve it? 
Thank you in advanced.