• gyani19901.3956550919266765E12
  • NEWBIE
  • 30 Points
  • Member since 2014
  • Mirketa Inc.


  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 29
    Replies
Hi Experts,

I have one problem in the trigger. Here two mail notifications are going instead of one when case is opened. The trigger is given below. Only one notification should go. Please help.


         
   Apex Coding to send email to the Account insidesales rep based on case status.
           
    1.If Case Status is Open then Send email notification to the account insidesalesrep  .
   
 
    
Trigger Case_AIU_Rep_Notification  on Case (after insert,after update) {
    Set<Id> accIds = new Set<Id>();
    Set<Id> contIds=new Set<Id>();
    
    List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
    if(checkRecursive_Case_AIU_Rep_Notification.runOnce())
    {
    for (Case c: trigger.new) {
     If(c.Status == 'Open'){
        accIds.add(c.AccountId);
         contIds.add(c.ContactId);
        }
    }
    Map<Id, Account> accMap = new Map<Id, Account>([SELECT Id,name,Customer_ID__c, thermage_tlr__Rep_2__r.Email,thermage_tlr__Consumable_Rep__r.name,thermage_tlr__Rep_3__r.name,thermage_tlr__Rep_1__r.name,thermage_tlr__Capital_Rep__r.name FROM Account WHERE Id In :accIds]);
    Map<Id,Contact> contMap=new Map<Id,Contact>([select id,lastname,firstname from contact where id in:contids]);
    //System.debug('accMap '+accMap );
    for (Case c : trigger.new) {
    
        string body='<h3>*** CASE OPENED NOTIFICATION ***</h3>'+' <br/>';
        body+='The following case has been opened.'+' <br/>';
        body+='Company:'+accMap.get(c.accountid).name +' <br/>';      
        body+='Customer id:'+accMap.get(c.Accountid).Customer_ID__c+' <br/>';
        body+='Contact Name: '+contMap.get(c.contactId).lastname+' <br/>';
        body+='Case #: '+c.CaseNumber+' <br/>'; 
        body+='Subject #: '+c.Subject+' <br/>'; 
        body+='Description #: '+c.Description +'<br/><br/>'; 
        body+= 'Click on the link to access the case:<a href=https://cs51.salesforce.com/>'+c.CaseNumber+'</a>'+'<br/><br/>';
        body+='Account Manager:'+accMap.get(c.AccountId).thermage_tlr__Consumable_Rep__r.name +'<br/>'; 
        body+='Capital Specialist:'+accMap.get(c.AccountId).thermage_tlr__Capital_Rep__r.name+'<br/>'; 
        body+='Surgical Specialist:'+accMap.get(c.AccountId).thermage_tlr__Rep_3__r.name+'<br/>'; 
        body+='Clinical Specialist:'+ accMap.get(c.AccountId).thermage_tlr__Rep_1__r.name+'<br/>';
      
        String Subject='Open Case # '+c.CaseNumber+','+ accMap.get(c.Accountid).Name+' | Account Manager :'+accMap.get(c.Accountid).thermage_tlr__Consumable_Rep__c;
        Account relatedCaseaccount = accMap.get(c.AccountId);
       
        Messaging.SingleEmailMessage CaseNotificationmail = new Messaging.SingleEmailMessage();  
        CaseNotificationmail.setToAddresses(new List<String> {accMap.get(c.AccountId).thermage_tlr__Rep_2__r.Email});
       
        CaseNotificationmail.setSubject(Subject);
       
        CaseNotificationmail.setHtmlBody(body);
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] {CaseNotificationmail});

       mails.add(CaseNotificationmail); 
    
    }
    Messaging.sendEmail(mails);
   }
}

 
Hi,  
I am trying to complete my LEx Specialist Sperbadge. In Challenge 2, I am getting the below error:
The requirement given is: When I see my Opportunities, I can see:
User-added image
I have created one new org but not able to fix this issue.
I am facing this issue in my both new and old org.
For this I created one opportunity path and in the path select the Awaiting Approval and also put the guideline steps.
User-added image
I am not able to figure out what the issue is.
I have tried deleting the existing Sales Path and created one again. Did not work.
I am stuck in Challenge 2. Kindly help.

Regards,
Gyanender Singh
Hi Everyone,
My requirement is that i have to encrpted and decrpted the attachment and for this i have write a trigger on attachment and my code is:

trigger encryptAttachment on Attachment (before insert) {
    EncryptionKey__c keySetting = EncryptionKey__c.getOrgDefaults();
    Blob aesKey;
    if(String.isBlank(keySetting.aeskey__c)) {
        keySetting.aeskey__c = EncodingUtil.base64Encode(Crypto.generateAesKey(256));       
        keySetting.name = 'testencrypted';
        upsert keySetting;
    }
    aesKey = EncodingUtil.base64Decode(keySetting.AesKey__c);
    for(Attachment record:Trigger.new) {
        record.body = Crypto.encryptWithManagedIV('AES256', aesKey, record.body);
    }
}


i used this code for encryption and for decryption i created a vf page and the controller which is used to browse the encrypted file and used decrpted method show the page in the iframe.

Code of the vf page and controller is :

Vf Page

<apex:page standardController="Attachment" extensions="decryptAttachment">
    <apex:Form >
        <apex:inputFile value="{!attched.body}" filename="{!attched.name}"/>
        <apex:commandButton value="Decrypted" action="{!decryptAttachment}"/>
       
            <iframe src="data:{!attched.ContentType};base64,{!decryptfile}" ></iframe>
           
    </apex:form>
</apex:page>

Controller :
public with sharing class decryptAttachment {
  
    public Attachment attched{get;set;}
    public string decryptfile{get;set;}
    public decryptAttachment(ApexPages.StandardController controller) {       
        attched = new Attachment();
      
    }
    public void decryptAttachment() {       
             
        EncryptionKey__c keySetting = EncryptionKey__c.getOrgDefaults();
        Blob aesKey = EncodingUtil.base64Decode(keySetting.AesKey__c);         
        decryptfile   =  EncodingUtil.Base64Encode(Crypto.decryptWithManagedIV('AES256', aesKey, attched.Body)); 
       
    }
}

Now everything is working fine for text and doc format but it is not supported in the pdf file because when i attach pdf file and click on the view button then it show "Failed to load file" and another problem with pdf file its not supported for the large pdf file.

Thanks in advance for the solution..



 
Hi eveyone,
I am trying to create a popup notification that is show after every new lead and for this i create a workflow rule and a task , task is created in the related list of the lead but pop up is not sheen and i also enable the pop up block in the browser,, so please help me regarding the problem.
thanks in advance.....
Please help me regarding this validation , 
in the phone field we could enter only 10 digit not more or less than 10 digit and not contain any chanracter and i have created a validation which is as follow but in this there is a problem if we enter a number like 1234567891as then it not showing any error and for every condition it is perfect, please help me.
my validation is:
IF (not(isblank(Phone)),OR(NOT(REGEX(Phone , "\\D*?(\\d\\D*?){10}")), NOT(ISNUMBER(Phone))),NULL)
Please help me , How do i fix error Login Rate Exceeded" Error?
hello,
i have a vf page in which , i am using active tab functionality ,
User-added image
my problem is how can i change the font color of the "Opportunity Details" and "Tracking Repairs" and i try contentstyle and the another thing is how can i use own background imgage in place of label my code is:

<style>
    .activeTab {
        background-color: #8A9744;background-image:none; padding-top:5px;height:15px;
    }
    .inactiveTab{
        background-color: #8A9744; background-image:none; padding-top:5px;height:15px;
    }
</style>

<apex:tabPanel switchType="client" selectedTab="tabdetails" id="OpportunityTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab" contentstyle="font-size:50px;color:white; font-weith:bold">
{
    code
}
</apex:tabPanel>

can some help me,, many thanks
Hi All,
I have written a apex class and vf page ,like

Apex Code:
public class dashboardcontrollerFor30Days
{
    public list<innerdashdata> data{get;set;}
    public list<task> tsklist;
    public list<AggregateResult> tsklist2;
    public list<AggregateResult> tsklist3;
    public map<id,integer> countmap;
    public map<id,integer> countmap2;
    public map<id,integer> countmap3;
    public map<id,integer> countmap4;
    public map<id,map<string,integer>> mapofdata = new  map<id,map<string,integer>>();
    public list<event> evntlist;
    public dashboardcontrollerFor30Days()
    {
        Set<String> names = new Set<String>{'%ABC%'};
        Set<String> names2 = new Set<String>{'Call','Added to Case from Contacts','CourtLink Lead','Data Entry Request','Dogsheet Lead','Email','Gift','Research Request'};        
        tsklist = new list<task>();
        evntlist = new list<event>();
        countmap = new map<id,integer>();
        countmap2 = new map<id,integer>();
        countmap3 = new map<id,integer>();
        countmap4 = new map<id,integer>();
       
        tsklist = [select ownerid,id,status from task where (not subject like '%mass%') and (not subject like '%DFW Survival Football Pool %') and (not owner.name like:names) and type =:names2 and (status ='1. Completed - PHONE CALL' OR status ='2. Completed - LEFT MESSAGE' OR status ='3. Completed - SENT EMAIL' )  and lastmodifieddate = LAST_N_DAYS:30];
     
     for(task tk : tsklist )
     {
         if(!mapofdata.keyset().contains(tk.ownerid))
         {
             mapofdata.put(tk.ownerid,new map<string,integer>());
         }
         if(!mapofdata.get(tk.ownerid).keyset().contains(tk.status))
         {
             mapofdata.get(tk.ownerid).put(tk.status,0);
         }
        integer count =  mapofdata.get(tk.ownerid).get(tk.status)+1;
        mapofdata.get(tk.ownerid).put(tk.status,count );
     }
      system.debug('********************'+mapofdata);
     
     
     
        
         data = new list<innerdashdata>();
         map<id,user> usermap = new map<id,user>([select id,name from user where isactive = true]);
      
        for(string str : mapofdata.keyset())
        {
             integer counttotal =  (mapofdata.get(str).get('1. Completed - PHONE CALL')!=null?mapofdata.get(str).get('1. Completed - PHONE CALL'):0) + (mapofdata.get(str).get('2. Completed - LEFT MESSAGE')!=null?mapofdata.get(str).get('2. Completed - LEFT MESSAGE'):0) + (mapofdata.get(str).get('3. Completed - SENT EMAIL')!=null?mapofdata.get(str).get('3. Completed - SENT EMAIL'):0);
             system.debug('**************************'+counttotal );
             data.add(new innerdashdata(mapofdata.get(str).get('1. Completed - PHONE CALL')!=null?mapofdata.get(str).get('1. Completed - PHONE CALL'):0,mapofdata.get(str).get('2. Completed - LEFT MESSAGE')!=null?mapofdata.get(str).get('2. Completed - LEFT MESSAGE'):0,mapofdata.get(str).get('3. Completed - SENT EMAIL')!=null?mapofdata.get(str).get('3. Completed - SENT EMAIL'):0,usermap.get(str).name+' '+ string.valueof(counttotal)));
        }
         system.debug('***************countmap'+data);
        
        
             
    }

    public class innerdashdata
    {
    public string name{get;set;}
    public decimal data1{get;set;}
    public decimal data2{get;set;}
    public decimal data3{get;set;}
    public string total{get;set;}
   
        public innerdashdata(decimal  data1,decimal data2,decimal data3,string name)
        {
            this.data1 = data1;
            this.data2 = data2;
            this.data3 = data3;
            this.name = name;
            
        }
    }

}


===== vf page 



<apex:page controller="dashboardcontrollerFor30Days" showHeader="false" sidebar="false" cache="false">

<div style="width:255px; height:460px;background-color:#E8E8FF;">
  <apex:chart data="{!data}" height="460" width="250">
    <apex:axis type="Numeric" position="bottom" title="Count" fields="data1,data2,data3" dashSize="2">
        <apex:chartLabel />
    </apex:axis>
    
    <apex:axis type="Category" position="left" fields="name" title="Assigned" >
        <apex:chartLabel />
    </apex:axis>
       
    <apex:barSeries orientation="horizontal" axis="left" stacked="true" 
        yField="name" xField="data1,data2,data3" title="Completed - PHONE CALL,Completed - LEFT MESSAGE,Completed - SENT EMAIL" />
  </apex:chart>
  <hr/>
    <table style="background-color:#E8E8FF;width:255px;">
        <tr>
            <td>
                <img src="{!$Resource.Blue}" style="margin-left:50px;"/>
            </td>
            <td>
                Completed - PHONE CALL 
            </td>
        </tr>
        <tr>
            <td>
                <img src="{!$Resource.Orange}" style="margin-left:50px;"/>
            </td>
            <td>
                Completed - LEFT MESSAGE 
            </td>
        </tr>
        <tr>
            <td>
                <img src="{!$Resource.Green}" style="margin-left:50px;"/>
            </td>
            <td>
                Completed - SENT EMAIL  
            </td>
        </tr>
    </table>           
</div>

</apex:page>



in this code i got an error 'Time Limit Exceed' and page take lots of time on loading. So Please help me , how can i remove this error.
 
I have a vf page and in this create the dashboard and i have to remove the box and not showing name , i have to show only total which comes already ,, so how can i remove the name ?
and my vf page code is:

<apex:page controller="controllerFor1ST_MEETINGSS7Days" showHeader="false" sidebar="false">
    <div style="width:255px; height:200px;background-color:#E8E8FF;">
        <apex:chart data="{!data}" height="200" width="250">
            <apex:axis type="Numeric" position="bottom" title="Record Count" grid="true" fields="data1,data2,data3" dashSize="3">
                <apex:chartLabel />
            </apex:axis>
            
            <apex:axis type="Category" position="left" fields="name" title="Assigned">
                <apex:chartLabel />
            </apex:axis>
           
            <apex:barSeries orientation="horizontal" axis="left"  stacked="true"  
                yField="name" xField="data1,data2,data3" title="Meeting - CLE/Presentation,Meeting - Depo,Meeting - Drive By,
                Meeting - Ent - F/U,Meeting - F/U,Meeting - Intro,Meeting - Phone,Meeting - 1st,Meeting - Ent - 1st"  />
      </apex:chart>
      <hr/>
        <table style="background-color:#E8E8FF;width:255px;">
            <tr>
                <td>
                    <img src="{!$Resource.Blue}" style="margin-left:50px;"/>
                </td>
                <td>
                   
                    1st Meetings and 1st Entertains
                </td>
            </tr>
            
            <tr>
                <td>
                    <img src="{!$Resource.Green}" style="margin-left:50px;"/>
                </td>
                <td>
                
                   F/U Meetings and F/U Entertains
                </td>
            </tr>
            
            <tr>
                <td>
                    <img src="{!$Resource.Orange}" style="margin-left:50px;"/>
                </td>
                <td>
                 
                    Drive By/CLE/Other
                </td>
            </tr>
        </table>
    </div>
</apex:page>
User-added image
Hi,
I have a vf page and in this vf page i use a loading image and this image is show in system but i want to show in the salesforce1 app so what should i have to do regarding this pop up on button click.
User-added image
Hi,
I have a vf page and in this create a dashboard as show in fig.1 in this use <apex:legend position="bottom"/> but i want to show vf page as show in fig 2 ,, if we use <apex:legend position="left"/> then position shift to left but i want bottom like as show in fig 2

User-added image

User-added image
i have a vf page on a custom object , and in the vf page i have a custom button so let me know that on click of button how can i recognize that the page is open in system(desktop or laptop) or this is in mobile salesforce 1 app,, so how can i find out
I am able to insert account record through site.com in salesforce without writing any apex code because site.com provide inbuilt functionality to send
custom and standard data to salesforce through wizard but there is no functionality is given to send attachment with same account instance.

Your help will be appriciable.

Regards 
Gyanender Singh
I am able to insert account record through site.com in salesforce without writing any apex code because site.com provide inbuilt functionality to send
custom and standard data to salesforce through wizard but there is no functionality is given to send attachment with same account instance.

Your help will be appriciable.

Regards 
Gyanender Singh
Hi,

Please help in writing test class for below piece of code. Thanks

public PageReference testFunction(){
        if(testRecord.Shift__c=='Hourly' || testRecord.Shift__c=='Daily'){
            testRecord.Start_Time__c = '8:30 AM';
            testRecord.End_Time__c = '3:30 PM';
        }else if(testRecord.Shift__c=='AM'){
            testRecord.Start_Time__c = '8:30 AM';
            testRecord.End_Time__c = '12:00 PM';
        }
        else if(testRecord.Shift__c=='PM'){
            testRecord.Start_Time__c = '1:00 PM';
            testRecord.End_Time__c = '3:30 PM';
        }
        return null;
    }

I want to create an popup alert on team members birthday/anniversary(birthday and anniversary are fields from user object). How to create such popup when we login. 

Thanks in Advance

Hi Experts,

I have one problem in the trigger. Here two mail notifications are going instead of one when case is opened. The trigger is given below. Only one notification should go. Please help.


         
   Apex Coding to send email to the Account insidesales rep based on case status.
           
    1.If Case Status is Open then Send email notification to the account insidesalesrep  .
   
 
    
Trigger Case_AIU_Rep_Notification  on Case (after insert,after update) {
    Set<Id> accIds = new Set<Id>();
    Set<Id> contIds=new Set<Id>();
    
    List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
    if(checkRecursive_Case_AIU_Rep_Notification.runOnce())
    {
    for (Case c: trigger.new) {
     If(c.Status == 'Open'){
        accIds.add(c.AccountId);
         contIds.add(c.ContactId);
        }
    }
    Map<Id, Account> accMap = new Map<Id, Account>([SELECT Id,name,Customer_ID__c, thermage_tlr__Rep_2__r.Email,thermage_tlr__Consumable_Rep__r.name,thermage_tlr__Rep_3__r.name,thermage_tlr__Rep_1__r.name,thermage_tlr__Capital_Rep__r.name FROM Account WHERE Id In :accIds]);
    Map<Id,Contact> contMap=new Map<Id,Contact>([select id,lastname,firstname from contact where id in:contids]);
    //System.debug('accMap '+accMap );
    for (Case c : trigger.new) {
    
        string body='<h3>*** CASE OPENED NOTIFICATION ***</h3>'+' <br/>';
        body+='The following case has been opened.'+' <br/>';
        body+='Company:'+accMap.get(c.accountid).name +' <br/>';      
        body+='Customer id:'+accMap.get(c.Accountid).Customer_ID__c+' <br/>';
        body+='Contact Name: '+contMap.get(c.contactId).lastname+' <br/>';
        body+='Case #: '+c.CaseNumber+' <br/>'; 
        body+='Subject #: '+c.Subject+' <br/>'; 
        body+='Description #: '+c.Description +'<br/><br/>'; 
        body+= 'Click on the link to access the case:<a href=https://cs51.salesforce.com/>'+c.CaseNumber+'</a>'+'<br/><br/>';
        body+='Account Manager:'+accMap.get(c.AccountId).thermage_tlr__Consumable_Rep__r.name +'<br/>'; 
        body+='Capital Specialist:'+accMap.get(c.AccountId).thermage_tlr__Capital_Rep__r.name+'<br/>'; 
        body+='Surgical Specialist:'+accMap.get(c.AccountId).thermage_tlr__Rep_3__r.name+'<br/>'; 
        body+='Clinical Specialist:'+ accMap.get(c.AccountId).thermage_tlr__Rep_1__r.name+'<br/>';
      
        String Subject='Open Case # '+c.CaseNumber+','+ accMap.get(c.Accountid).Name+' | Account Manager :'+accMap.get(c.Accountid).thermage_tlr__Consumable_Rep__c;
        Account relatedCaseaccount = accMap.get(c.AccountId);
       
        Messaging.SingleEmailMessage CaseNotificationmail = new Messaging.SingleEmailMessage();  
        CaseNotificationmail.setToAddresses(new List<String> {accMap.get(c.AccountId).thermage_tlr__Rep_2__r.Email});
       
        CaseNotificationmail.setSubject(Subject);
       
        CaseNotificationmail.setHtmlBody(body);
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] {CaseNotificationmail});

       mails.add(CaseNotificationmail); 
    
    }
    Messaging.sendEmail(mails);
   }
}

 
Hi all,

I want to popuate merge fields in email template, and generate PDF. How can I achieve this? Please help me

Thank you,
Pavan
I've created a custom link that brings up a VF page that should display an image file (instructions for the reps). 

1. How to I reference the image file in VF code?
2. Where and how do I store the actual image file in Salesforce? 

Thank you!
Hi,

I am trying to complete my LEx Specialist Sperbadge. In Challenge 2, I am getting the below error:
User-added image

The requirement given is:
User-added image
When I see my Opportunities, I can see:
User-added image

I am not able to figure out what the issue is. I have tried deleting the existing Sales Path and created one again. Did not work. I am stuck in Challenge 2. Kindly help.

Thanks! 
Hi,

I am working on force.com sites, for that I need to incorporate some radio buttons and those must be required fields.
So i coded like below,

<td align="center" width="10%" style="vertical-align:middle;text-align:center;">
                <div>
                    <apex:outputPanel >
                        <div class="requiredInput">
                        <div class="requiredBlock"> </div>
                         <apex:selectRadio id="EQ2" onchange="renderPhyDet(this);" value="{!MemberEnrollment__c.Emp_Q2_Selected__c}">
                            <apex:selectOption itemValue="Yes" itemLabel="Yes"> </apex:selectOption>
                            <apex:selectOption itemValue="No" itemLabel="No"> </apex:selectOption>
                            </apex:selectRadio>
                        </div>
                    </apex:outputPanel> 
                </div> 
            </td>


Vertical line is showing but the page is not stopping the user if he dont select the radio button.  

User-added image

So I added required="true" label="Choose One" to the radio button, now the page is not being submitted even I submit the page. I think this "required" attribute is working but error message is not being displayed at the radio field which I have mentioned in the "label".
Hello,

I am duplicating few objects, Ideally i wanted to have a detail object with two masters, but as it is not possible , I am obliged to make one of them as lookups..

What effects do the usage of lookup instead of masterdetail, will have on below things
1) Related lists in pagelayouts
2) I wanted to copy the records from one object to other using Apex
  • February 19, 2016
  • Like
  • 0
Hi experts,

I have 5 phone fileds 

1)home phone
2)cellphone
3)work phone
4)reference1phone
5)reference 2 phone.

None of the filelds should have the same number .Is it possible to display the error through the validation rule if the fileds have same number 


Thanks
Praveen
Hi guys,

I have created Rest API to integrate Salesforce with banking system.
I am facing problem with HmacSha256 encryption. I am using as below:

Blob blobSign = Crypto.generateMac('Hmac-SHA256', Blob.valueOf(privKey + xmlOutput.length() + unixTime));
String HMACKey = EncodingUtil.base64Encode(blobSign);

I am getting error 403.

Any one know how to connect external system. 

Thanks in advance.
Hi All,

I am tryging to update the sort order which user will change in the UI. Please let me know how my visualforce controller get to know the the sorting order. 

Regards,
Soumya Behera
Hi All 
I am facing problem when creating formula field it showing

You have reached the maximum number of 10 object references 

How to update field value of one object from other object field with some calculation.is it possible using trigger
Hi I'm having the error on my trigger

CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY:CreateOppForNewSubTriggger: System.LimitException: Too many SOQL queries: 101:--

The trigger is 
 
trigger ZuoraModoProductUpdate on Zuora__SubscriptionProductCharge__c (before insert, before update) {

    Set<Id> zsub_ids = new Set<Id>();
    for(Zuora__SubscriptionProductCharge__c zspc: trigger.new)
    {
        zsub_ids.add(zspc.Zuora__Subscription__c);
    }
    
    List<Zuora__Subscription__c> zsubs = [SELECT Id, Opportunity__c FROM Zuora__Subscription__c WHERE Id IN :zsub_ids];
    
    Map<Id, Zuora__Subscription__c> id_zsubs = new Map<Id, Zuora__Subscription__c>();
    Set<Id> opp_ids = new Set<Id>();
    for(Zuora__Subscription__c zsub : zsubs)
    {
        id_zsubs.put(zsub.Id, zsub);
        opp_ids.add(zsub.Opportunity__c);
    }
    
    List<Opportunity> opps = [SELECT Id, Modo_Web__c FROM Opportunity WHERE Id IN :opp_ids];
    
    Map<Id, Opportunity> id_opps = new Map<Id, Opportunity>();
    for(Opportunity opp : opps)
    {
        id_opps.put(opp.Id, opp);
    }
    
    List<Opportunity> update_opps = new List<Opportunity>();

    for(Zuora__SubscriptionProductCharge__c zspc: trigger.new)
    {
        if(zspc.Zuora__ProductName__c != null && zspc.Zuora__ProductName__c.toLowerCase().contains('modo')) 
        {
            if(zspc.Zuora__Subscription__c != null)
            {
                Zuora__Subscription__c zsub = id_zsubs.get(zspc.Zuora__Subscription__c);
                if(zsub.Opportunity__c != null)
                {
                    Opportunity opp = id_opps.get(zsub.Opportunity__c);
                    opp.Modo_Web__c = true;
                    update_opps.add(opp);
                }
            }
        }
    }
    update update_opps;
}

I believe it's something in the for loop but I can't finde where if someone could give me a light it will be much appreciated.

Thanks in advance.
 
Hi eveyone,
I am trying to create a popup notification that is show after every new lead and for this i create a workflow rule and a task , task is created in the related list of the lead but pop up is not sheen and i also enable the pop up block in the browser,, so please help me regarding the problem.
thanks in advance.....
Please help me regarding this validation , 
in the phone field we could enter only 10 digit not more or less than 10 digit and not contain any chanracter and i have created a validation which is as follow but in this there is a problem if we enter a number like 1234567891as then it not showing any error and for every condition it is perfect, please help me.
my validation is:
IF (not(isblank(Phone)),OR(NOT(REGEX(Phone , "\\D*?(\\d\\D*?){10}")), NOT(ISNUMBER(Phone))),NULL)
hello,
i have a vf page in which , i am using active tab functionality ,
User-added image
my problem is how can i change the font color of the "Opportunity Details" and "Tracking Repairs" and i try contentstyle and the another thing is how can i use own background imgage in place of label my code is:

<style>
    .activeTab {
        background-color: #8A9744;background-image:none; padding-top:5px;height:15px;
    }
    .inactiveTab{
        background-color: #8A9744; background-image:none; padding-top:5px;height:15px;
    }
</style>

<apex:tabPanel switchType="client" selectedTab="tabdetails" id="OpportunityTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab" contentstyle="font-size:50px;color:white; font-weith:bold">
{
    code
}
</apex:tabPanel>

can some help me,, many thanks

We enter our vendor invoices into our system and we have issues with duplicate invoices being entered. I wanted to make the vendor invoice number field (text) unique BUT what if there was the same invoice number for more than on vendor? (believe me it does happen with vendors who have four or three digit invoice numbers.)

 

I then thought of a way to create a formula that would concatenate the vendor account code with the vendor invoice number. That would then be a very unique number. BUT I don't think that you can make formulas unique.

 

What can I do?

  • April 22, 2010
  • Like
  • 0