• AKS018
  • NEWBIE
  • 55 Points
  • Member since 2013

  • Chatter
    Feed
  • 2
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 24
    Questions
  • 27
    Replies

Hi,

 

Can you plaese give me an example or suggestion to Read Ms word (.doc/.docx)file through Apex.

  • October 25, 2013
  • Like
  • 1

Is it possible to write a Trigger on "Organization" object in salesforce?

If so, could you please explain how i have to proceed.
  • September 19, 2013
  • Like
  • 0

HI,

 

Can you please, Give me suggetions how to override Standard button "Save & send Update" under Event Object.

 

This button is showing while creating Event record. If you click on Add Invities, the Button "Save & send Update" will be shown. So for this button i need to override. Is this possible to do? If so, how to follow. I serched in so many ways. But i didnt get a proper solution.

 
  • September 12, 2013
  • Like
  • 0

HI,

 

Can you please, Give me suggetions how to override Standard button "Save & send Update" under Event Object.

 

This button is showing while creating Event record. If you click on Add Invities, the Button "Save & send Update" will be shown. So for this button i need to override. Is this possible to do? If so, how to follow. I serched in so many ways. But i didnt get a proper solution.

  • September 12, 2013
  • Like
  • 0

In the live area there is currently a rule that means that the sales user from one geographical zone are not able to see sales pipeline information of Opportunity from another geographical zone.

 

Here The client would like this changed (starting with the sandbox area ONLY) so that sales user from any geographical area are able to see sales pipeline information from ANY other geographical area.

 

Actually in live area also, i dont know where is that rule. But now i need to chage as like the client need. Can anyone help me how to proceed for this....

In the live area there is currently a rule that means that the sales user from one geographical zone are not able to see sales pipeline information of Opportunity from another geographical zone.

 

Here The client would like this changed (starting with the sandbox area ONLY) so that sales user from any geographical area are able to see sales pipeline information from ANY other geographical area.

 

Actually in live area also, i dont know where is that rule. But now i need to chage as like the client need. Can anyone help me how to proceed for this....

Hi, 

In my visual force page i have multi select list field, In which we have available and chosen values. 

Now i have to clear chosen values from multi select  list field after every action. 

How to do it, can any one help me.

Hi,

 

  Here I have created site.  In visualforce page I have given facility to download the attachment.like

 

<apex:outputLink value="{!URLFOR($Action.Attachment.Download, attach.id)}" target="_blank"  style="text-decoration:none;">Download Consignment note</apex:outputLink>

 

It is not working in sites.

 

Is there any other way to download attachment through sites

Hi,

 

Under account list view i had a list view button, after click on that button i am exporting records data.

But here i need to get the records of selected list view according to filter criteria with selected columns only.how to do it in apex.

 

Can anyone explain me how to proceed, if you have any example.please share with me.it will be helpful.

HI,

 

       How to write the Validation rule on Record fields, that if the field has data the user not to modify that. If the field is empty means have allow to modify.

 

Here I wrote like this, But doesnt work properly.

 

OR(
AND(NOT( ISBLANK( IP__c ) ) ,ISCHANGED(IP__c )),
AND(NOT( ISBLANK(IP_Justification__c)),ISCHANGED(IP_Justification__c ) ),
AND(NOT( ISBLANK( Subdomain__c) ) ,ISCHANGED(Subdomain__c)),
AND(NOT( ISBLANK( SMTP_Username__c) ) ,ISCHANGED(SMTP_Username__c )),
AND(NOT( ISBLANK( DKIM_String__c) ) ,ISCHANGED(DKIM_String__c )),
AND(NOT( ISBLANK( FTP_Password__c) ) ,ISCHANGED(FTP_Password__c)),
AND(NOT( ISBLANK( FTP_Username__c) ) ,ISCHANGED(FTP_Username__c)),
AND(NOT( ISBLANK( POP_Password__c) ) ,ISCHANGED(POP_Password__c )),
AND(NOT( ISBLANK( POP_Username__c) ) ,ISCHANGED(POP_Username__c )),
AND(NOT( ISBLANK( SMTP_Password__c) ) ,ISCHANGED(SMTP_Password__c )),
AND(NOT( ISBLANK( SMTP_Username__c) ) ,ISCHANGED(SMTP_Username__c )),
AND(NOT( ISBLANK( Speed_Limit__c) ) ,ISCHANGED(Speed_Limit__c)) ,
AND(NOT( ISBLANK( Status_Date__c) ) ,ISCHANGED(Status_Date__c))


)

 

Can you please help how to write on fields.

 

Scenario:

If the record field data is there means, we restrict the user not to modify.

If the record field data is empty means, allow to user to enter data in to that field.

Hi,

 

      I am getting an error : Apex heap size too large, while Exporting the data in to a file.

 

Can you please tell me how to remove this error. Is it possible to export a file regardless  of File Size or number of Records through apex.

Hi,

 

 Accounts Activity history related list one button called "SEND AN EMAIL" when i click this button go to send email edit page

here "TO" Look up field can i filter only account has contacts only? how to filter? Can any one explain?

 

 

Thank you

Hi,

 

          Here i need to do integration with Dropbox from salesforce. How to proceed, can anyone tell me. If any relevent links are there, please share with me. it will be very helpful to me. Thanks for your support and help.

Hi,

 

          Here i need to do integration with Dropbox from salesforce. How to proceed, can anyone tell me. If any relevent links are there, please share with me. it will be very helpful to me. Thanks for your support and help.

Hi all,

 

           Thanks in advance. I had a requirement regarding irregular polygons. Please help me how to proceed for calculation.

 

Requirement:

To calculate Area of collision polygons through apex code. and also please explain me what are necessary for this calculation. 

Hi,

 

         How to read the Excel file and then to insert all the data records in to salesforce object.

 

Suppose I have an Excel file with Account object information. Now I have to upload that file to visualforce page. Then after  to read all the records in Excel and to store in Account object. All these has to implement in the visualforce and Apex class.

 

 

Can anyone please help me how to approach this type of task and also provide me any Examples.

  • April 19, 2013
  • Like
  • 0

Hi  All,

 

 I  have Come across   requirement  with  Google Calender integration with salesforce.  I  Follwed Google ApI toolkit for  ApI For Salesforce . In that I  am getting  Login Autentication successful and  that  I am getting Auth Value. But  It Needs token, I am Not getting the token though API Tool kit . How can we get the  AUth Value . Please give me any inputs

  • April 05, 2013
  • Like
  • 0

Hi,

 

How to sync salesforce Events to google calendar using apex code.

 

Can you please send me any Examples or links related to google calendar with salesforce.

  • April 02, 2013
  • Like
  • 0

Hi, I am getting an Error while uploading a package...Below is the Error..

 

An internal server error has occurred

An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

 

Can you please tell me Why these type of Errors is Occured.

  • March 20, 2013
  • Like
  • 0

Hi,

      How to assign a value to the Outputfield and to display in the page.

and also how to assign a value to the InputHidden in the visual force page.

 

In my page I have the fields like

 

<apex:outputfield value="{!t.sobj.TaxRate__c}" id="taxRateType" />

<apex:inputHidden value="{!t.sobj.ServiceRate__c}" id="hidServiceRate" />

 

 

Please tell me how to write in Jquery to assign values for the above fields.

  • March 18, 2013
  • Like
  • 0

Hi,

 

Can you plaese give me an example or suggestion to Read Ms word (.doc/.docx)file through Apex.

  • October 25, 2013
  • Like
  • 1

Is it possible to write a Trigger on "Organization" object in salesforce?

If so, could you please explain how i have to proceed.
  • September 19, 2013
  • Like
  • 0

HI,

 

Can you please, Give me suggetions how to override Standard button "Save & send Update" under Event Object.

 

This button is showing while creating Event record. If you click on Add Invities, the Button "Save & send Update" will be shown. So for this button i need to override. Is this possible to do? If so, how to follow. I serched in so many ways. But i didnt get a proper solution.

 
  • September 12, 2013
  • Like
  • 0

Hi all,

 

I have one master- Child relation between two objects Case_Accession (Master) , Apcase(Child). Now I want to access the different fileds in one object only of Case_Accession so that I can show it on VF page in the form of Data Table. But I am getting  error "Error: Could not resolve field 'CaseNo__c' from <apex:outputField> value binding '{!wrklst.CaseNo__c}' in page WorkList". 

 

My Code is this

 

public class Worklist
{
    public List<Case_Accession__c> objWorklist {get;set;}
   
    public Worklist()
    {
        objWorkList = new List<Case_Accession__c>();
        objWorkList = [Select PatientName__c,PhysicianName__c ,(select CaseNo__c from ApCase__r) from Case_Accession__c];
    }

 

Visual Foce

 

<apex:page controller="Worklist">
     <apex:Form >
     <apex:pageBlock >
             <apex:pageblockSection >
                 <apex:dataTable id="dtWorklist" value="{!objWorklist }" var="wrklst"  cellspacing="16%">
                  <apex:column headerValue="Patient Name" >
                   <apex:outputField value="{!wrklst.PatientName__c}" />
                   </apex:column>
                   <apex:column headerValue="Physician Name" >
                   <apex:outputField value="{!wrklst.PhysicianName__c}" />
                   </apex:column>
                 <apex:column headerValue="Physician Name" >
                   <apex:outputField value="{!wrklst.CaseNo__c}" />
                   </apex:column>
                   <apex:column headerValue="Edit Case">
                   <apex:commandLink title="Edit" value="Edit"/>
                   </apex:column>
                 </apex:dataTable>
         </apex:pageblockSection>
     </apex:pageBlock>
     </apex:Form>
</apex:page>

 

Please help, Thanks in advance
   
}

Hi,

 

I would like to send an email with the record details(ex:Case Details) as an atachment in the Email Dynamically.

can someone help me to achieve this functionality?

 

Thanks

Harish

 

This works fine...

 

    public void searchAndCreateContact(){
        
        String payerEmail = '';
        if(username != ''){
            payerEmail = username;
            List<User>lstPayerContact = [select ContactId, name, AccountId FROM User where Username = :username];
        }else{
            payerEmail = mapParameters.get('payer_email');
            List<Contact>lstPayerContact = [select id,name,AccountId from Contact where Email = :payerEmail ];
            }
        List<Contact>lstPayerContact = [select id,name,AccountId from Contact where Email = :payerEmail ];
        // why can the above line not be nested in the else statement above.
        // Error: Compile Error: Variable does not exist: lstPayerContact at line 231 column 20
        if(lstPayerContact  != null && lstPayerContact.size()>0){
            cont = lstPayerContact[0];
            List<Account>lstAccount = [select id,name from Account where id=:cont.AccountId];
            if(lstAccount != null && lstAccount.size()>0)
                accnt = lstAccount[0];
            
        }else{

 

Why can does this not compile?

 

    public void searchAndCreateContact(){
        
        String payerEmail = '';
        if(username != ''){
            payerEmail = username;
            List<User>lstPayerContact = [select ContactId, name, AccountId FROM User where Username = :username];
        }else{
            payerEmail = mapParameters.get('payer_email');
            List<Contact>lstPayerContact = [select id,name,AccountId from Contact where Email = :payerEmail ];
            }

        if(lstPayerContact  != null && lstPayerContact.size()>0){
            cont = lstPayerContact[0];
            List<Account>lstAccount = [select id,name from Account where id=:cont.AccountId];
            if(lstAccount != null && lstAccount.size()>0)
                accnt = lstAccount[0];
            
        }else{

 

Thanks

 

    public void searchAndCreateContact(){                String payerEmail = '';        if(username != ''){            payerEmail = username;            List<User>lstPayerContact = [select ContactId, name, AccountId FROM User where Username = :username];        }else{            payerEmail = mapParameters.get('payer_email');            List<Contact>lstPayerContact = [select id,name,AccountId from Contact where Email = :payerEmail ];            }        List<Contact>lstPayerContact = [select id,name,AccountId from Contact where Email = :payerEmail ];        // why can the above line not be nested in the else statement above.        // Error: Compile Error: Variable does not exist: lstPayerContact at line 231 column 20        if(lstPayerContact  != null && lstPayerContact.size()>0){            cont = lstPayerContact[0];            List<Account>lstAccount = [select id,name from Account where id=:cont.AccountId];            if(lstAccount != null && lstAccount.size()>0)                accnt = lstAccount[0];                    }else{

  • July 29, 2013
  • Like
  • 0

Hi, 

In my visual force page i have multi select list field, In which we have available and chosen values. 

Now i have to clear chosen values from multi select  list field after every action. 

How to do it, can any one help me.

Hello Community,

 

                Can any one briefly explain about VF life cycle and order of execution in detail

 

 

                  thanks for giving reply (In Advance)

 

 

       Thanks and Regards

         

 

                

below is my trigger where I am trying to update the value in field But couldnt update because of recursive trigger.

 

what needs to be done to update the value

 

trigger UpdateCallsByOtherTerritories on String__c(after update) {
for( String__c doc:trigger.new){            

    List<Account> AccountList = [Select Total_Calls_Formula__c,called_by_other__c , OwnerId, Co_Owner__c, Name from Account where name = :doc.Account__r.name];
    List<Account> listOfUpdatedAccounts = new List<Account>();
    
    for (account indexAccount:AccountList)
    {
        if (indexAccount.OwnerId == userinfo.getuserid()) { }
        else
        {
            indexAccount.called_by_other__c = indexAccount.called_by_other__c + (doc.Updated_CallString__c - Trigger.oldMap.get(doc.Id).Updated_CallString__c);
            
        }}

 

Hi,

 

  Here I have created site.  In visualforce page I have given facility to download the attachment.like

 

<apex:outputLink value="{!URLFOR($Action.Attachment.Download, attach.id)}" target="_blank"  style="text-decoration:none;">Download Consignment note</apex:outputLink>

 

It is not working in sites.

 

Is there any other way to download attachment through sites

Hi,

 

I refreshed sandbox(Test) from production and now I am unable to access that.

 

I am following the below credentials.

 

Usename:  Production Username.test

Password: Production Password

 

Could any one help me on this please.

 

 

All

 

Here is my query

 

orderHistListRec33 = [Select Name,Account__c,Order_Status__c, Case_Number__c, Product_Description__r.Is_Package__c, Product_Description__r.Name,CreatedDate
From Order_History__c order by createdDate dsc ];

 

I get 

 

 

List is 

 

OrderHistoryNumber (Name): 123    Product_Description__r.Name:Branding    CreatdeDate : 6/25/13

OrderHistoryNumber(Name) : 124    Product_Description__r.Name:CHAT    CreatdeDate : 6/25/13

OrderHistoryNumber (Name): 125    Product_Description__r.Name:Branding   CreatdeDate : 6/22/13

OrderHistoryNumber(Name) : 126     Product_Description__r.Name:CHAT    CreatdeDate : 6/22/13

 

I want to eleiminate duplicate Product_Description__r.Name and get most recent i.e. 

 

 

OrderHistoryNumber (Name): 123    Product_Description__r.Name:Branding    CreatdeDate : 6/25/13

OrderHistoryNumber(Name) : 124    Product_Description__r.Name:CHAT    CreatdeDate : 6/25/13

 

how do i modify my query .

The trigger below calls a class. The purpose of the whole thing is to create a new custom object record when an opp is created or edited to meet a few criteria.

 

The thing works in the ui on single records, and I also ran bulk inserts and updates and it all works.

 

Problem is I'm going to deploy to prod, and I'm getting an error telling me that it's "attempting to de-reference a null object".

 

Does anyone see how or where this error is in the trigger or class, and how it could be resolved?  I have spent like all day trying to get past this error and no matter what I do I keep getting it.

 

 

Trigger:

 

 

trigger OpportunityTrigger on Opportunity(after insert,after update){

if (Trigger.isAfter) { /* BEGIN Services Engagement Auto-create Processing for Opps */ ServicesEngagementManager newSEOnOppInsert = new ServicesEngagementManager(); if(Trigger.isInsert){ newSEOnOppInsert.createEngagementWhenNeededOnOppInsert(Trigger.new); } ServicesEngagementManager newSEOnOppUpdate = new ServicesEngagementManager(); if(Trigger.isUpdate){ newSEOnOppUpdate.createEngagementWhenNeededOnOppUpdate(Trigger.new, Trigger.oldMap); } /* END Services Engagement Auto-create Processing */

...

}

 

 

Class:

 

public class ServicesEngagementManager{

    public void createEngagementWhenNeededOnOppInsert(List<Opportunity> opportunities)
    {

        List<Opportunity> opps = [SELECT Id,Services_to_be_Delivered_by__c,Owner.Id,Probability,Threshold__c,Account.Id,Account.Name,Region__c,
                                                       CreatedById,Account.Region__r.OwnerId,Account.Region__r.RSA_Manager__r.Id,Professional_Services__c, 
                                                       Name From Opportunity WHERE id IN:Opportunities];
        List< SFL5_Projects__c> engagementsToCreate = new List<SFL5_Projects__c>();

        for(Opportunity opp: opps)
            if((opp.Probability>=75 && opp.Services_to_be_Delivered_by__c.contains('Training Team')) || (opp.Probability>=50 && 
                (opp.Services_to_be_Delivered_by__c.contains('Global Client Services')||opp.Services_to_be_Delivered_by__c.contains('Partner') ||  
                 opp.Services_to_be_Delivered_by__c.contains('Regional personnel')   )))   
        {
               SFL5_Projects__c engagementToAdd = new SFL5_Projects__c();

               if(opp.Account.Region__r.RSA_Manager__r.Id!=null &&  opp.Account.Region__c !=null){
               engagementToAdd.OwnerId = opp.Account.Region__r.RSA_Manager__r.Id;
                } else{
                   engagementToAdd.OwnerId = opp.Owner.Id;
                }
                engagementToAdd.Name = 'Services Engagement for: '+ opp.Account.Name;
                engagementToAdd.Opportunity__c = opp.Id;
                engagementToAdd.Client__c = opp.AccountId;
                engagementToAdd.Region__c = opp.Region__c;
                engagementToAdd.Project_Status__c = 'Active';
                engagementToAdd.Services_Amount__c = opp.Professional_Services__c;
                engagementToAdd.Services_to_be_Delivered_by__c = opp.Services_to_be_Delivered_by__c;
                engagementsToCreate.add(engagementToAdd);
         }
           insert engagementsToCreate;        
    }
   
    public void createEngagementWhenNeededOnOppUpdate(List<Opportunity> opportunities, Map<Id, Opportunity> oldMap)
    {
        List<Opportunity> opps = [SELECT Id, Threshold__c,Account.Id,Account.Name,Region__c,CreatedById,Account.Region__r.OwnerId,
                                                       Account.Region__r.RSA_Manager__r.Id,Professional_Services__c, Name From Opportunity WHERE id IN:Opportunities];
        List< SFL5_Projects__c > engagementsToCreate = new List< SFL5_Projects__c >();

        for(Opportunity opp: opportunities)
        {
            Opportunity beforeUpdate = oldMap.get(opp.Id);
            if(opp.Threshold__c=='1' && beforeUpdate.Threshold__c!='1')
           {
               SFL5_Projects__c engagementToAdd = new SFL5_Projects__c();
               
               if(opp.Account.Region__r.RSA_Manager__r.Id!=null)
               {
                  engagementToAdd.OwnerId = opp.Account.Region__r.RSA_Manager__r.Id;
                } else{
                   engagementToAdd.OwnerId = opp.OwnerId;
                }
                   engagementToAdd.Name = 'Services Engagement for: '+ opp.Account.Name;
                   engagementToAdd.Opportunity__c = opp.Id;
                   engagementToAdd.Client__c = opp.AccountId;
                   engagementToAdd.Region__c = opp.Region__c;
                   engagementToAdd.Project_Status__c = 'Active';
                   engagementToAdd.Services_Amount__c = opp.Professional_Services__c;
                   engagementsToCreate.add(engagementToAdd);
               }
         }

           insert engagementsToCreate; 
    }

}

 

  • June 26, 2013
  • Like
  • 0

Hello, I'm pretty new to salesforce and I'm trying to deploy a trigger I adjusted from an online source.

 

I cannot deploy/validate the trigger, because the results of the Test coverage are 0%. However, when I run the code on the developer console, I get higher percentages. Still, there are some tests that the code fails in the DC as well. I would appreciate any help in getting past this stage.

 

The code is meant to prevent deleting contacts of a certain record type id. Here are the code and the test:

 

//Prevent deleting a contact that is associated with a 203k disbursement
trigger dontDelete on Contact (before delete)
{
for (Contact x : Trigger.old)
{
if (x.RecordTypeId=='01250000000DwuV')
{
x.addError('You cannot delete this an account of type "Contractor"');
}
}
}

 

 

@isTest
private class TestDontDelete
{
static testMethod void myUnitTest()
{
List<Contact> con = [SELECT id FROM Contact WHERE RecordTypeId ='01250000000DwuV'];

try
{
delete con;
}
catch (dmlexception e)
{
system.assert(e.getMessage().contains('You cannot delete this an account of type "Contractor"'),
e.getMessage());
}
}
}

 

 

 

  • June 26, 2013
  • Like
  • 0

Hi Team,

 
  Please help how to schedule a apex class to run for every 2 weeks.
 
 

There are seven fields for Salesforce’s cron syntax, unlike *nix’s 5 fields.

  • Seconds [0-59]
  • Minutes [0-59]
  • Hours [0-23]
  • Day of month [1-31]
  • Month [1-12 or JAN-DEC]
  • Day of week [1-7 or SUN-SAT]
  • Year [1970-2099]

I seen above two but am not getting how to schedule it for 2 weeks please help me on that. thanks in advance

 

 

 

Hi,

 

 Accounts Activity history related list one button called "SEND AN EMAIL" when i click this button go to send email edit page

here "TO" Look up field can i filter only account has contacts only? how to filter? Can any one explain?

 

 

Thank you