• shravan
  • NEWBIE
  • -1 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 23
    Replies

Hi All,

 

I have created the visulforce page. It contains the text field, in this text field we will give the apex class API name. On click of "Add" button this class should add in outbound change set. If we click "Delete" it should delete from the outbound change set.

 

Also apex class Add and Delete should be specific to one change set.

 

Please let me know the possibilities

 

Regards,

Shravan Boddula

  • September 26, 2013
  • Like
  • 0

Hi All,

In formula field exceeding 5000 characters, here I used Formula_Field_Value__c in 3 times, is it possible to reduce 2 times with same result.

IF( Formula_Field_Value__c <=0, "",
IF( Formula_Field_Value <=1.6, "Low",
IF(Formula_Field_Value__c >= 2.2,"High","Medium")
))

 

Informaion:

And the solution should be in formula field becuase for old records also it should update the field value.

if it is workflow old value are not updating so in this case it should be in formula field.

 

Regards,

Shravan Boddula

Hi,

 

below are the pageblocktable and outputfield.

 

                       jan        feb        mar         apr

test1               15          24        23            12

test2               15          25        25            65

test3               23          54        25            12

 

On double click of '25' it should change as an input field and when the value is changed and we lost focus from the field we should update only this field without refreshing the page.  We are not able to capture the event for calling the function to update the field. Urgent requirement! please help!!!!!!!!.

Hi All,

 

My requirement is:

 

In a search(search means :click on any object---->click on go---> here we are selecting multiple checkboxes),added one button(Update). On click of button implemented java script code as a

-------------------------------------------------------------------------------------

{!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")};
    var url = parent.location.href;
    var records = {!GETRECORDIDS($ObjectType.WLM_Work_Request__c)};
    var updateRecords = [];
 
    if (records[0] == null) {
        alert('Please select at least one record to take ownership');
    }
    else {
        for (var a=0; a<records.length; a++ )
        {
                                                  
            var update_Engineer = new sforce.SObject("WLM_Work_Request__c");
                                                   
            update_Engineer.Id = records[a];
                                      
            update_Engineer.Assigned_EngineerId__c= '{!User.Id}';
                                                   
            update_Engineer.OwnerId = '{!User.Id}';
                                                    
            updateRecords.push(update_Engineer);
                                                   
                                                    
        }
        result = sforce.connection.update([updateRecords]);
        alert('Processing6666666666......');
 
    parent.location.href = url;
    }

--------------------------------------------------------------------------------------------------

 

problem is: field is not updating but I am getting processing6666666666 alert.

Hi,

 

When we clicking on delete button dailog box appears. Message in dailog box is "Are you sure?".

I want to change message in that dailog box.

 

Plz Help Me.

 

Regards,

Shravan Boddula

Hi,

 

I am able to do test method for this class but I need 100% code coverage for this class.

************* Class *****************

public with sharing class AegisController {

     Account acc;
     Id loggedInUser;
     public boolean errorFlag {get;set;} { errorFlag = false; }
     public AegisController(ApexPages.StandardController controller) {
           acc = (Account)controller.getrecord();
           loggedInUser = UserInfo.getuserId();
     }
     public void RequiredFieldValidation() {
            try {
                    if(acc.Rating == null)
                          errorFlag=true;
            }
            catch(Exception e) {
                    errorFlag=true;
            }
     }
}

 

 

*************** Test Method *******************

@isTest

public class Test_AegisController {
      static testMethod void testAegisController() {
            Account acc = new Account(Name='shravan'); 
            insert acc;
            ApexPages.StandardController sc = new ApexPages.StandardController(acc);
            AegisController aegisController = new AegisController(sc);
            aegisController.RequiredFieldValidation();

            /*
            //-ve test case

            Account acc1 = new Account(); 
            insert acc1;
            ApexPages.StandardController sc1 = new ApexPages.StandardController(acc);
            AegisController aegisController1 = new AegisController(sc);
            aegisController1.RequiredFieldValidation();
            System.debug('****Exception*****');

            */
         }
 }

 

Here code coverage 83%. Plz help me to increase the code coverage.

 

Hi,

 

how to check unbrekable word in apex:

 

Ex: String name1 = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; // unbrekable word

       

Don't check  if name1 like  ' ' (space).

 

 

Please Reply ASAP

 

Regards,

Shravan

 

Hi,

 

 

Please can you share the Syllabus and Meterial for Salesforce Certification Dev401 winter`12.

 

 

Regards,

Shravan

Hi,

 

I added my fields in Header tag, the fields are comming in every page but alignment is very big problem so please any more solution to add fields in every pdf page.

 

 

I am using below code:

 

<apex:form style="font-family:Arial;font-size:10pt;">

 

<apex:pageBlock >

<apex:pageBlockSection columns="1">

<apex:pageBlockTable value="{!finalRG}" var="l" rendered="{!NOT(ISNULL(finalRG))}" cellspacing="3">

 

<apex:column value="{!l.rg.name}" headerValue=" Relationship Group Name" footerValue="GrandTotals({!count}Records)" style="font-family:Arial;font-size:10pt;"/>

 

 

<apex:column headerValue="Primary Name" style="font-family:Arial;font-size:10pt;">

{!NULLVALUE(l.rg.households__PrimaryAccount__r.Name,'-')}

</apex:column>

 

 

 

<apex:column style="font-family:Arial;font-size:10pt;">

<apex:facet name="header">Role</apex:facet>

{!IF(ISNULL(l.rg.households__Tests__r),'-',IF(l.rg.households__Tests__r.size>0,BLANKVALUE(l.role,'-'),'-'))}

</apex:column>

 

</apex:pageBlockTable>

</apex:pageBlockSection>

</apex:pageBlock>

</apex:form>

Hi,

 

 

I genereated pdf file In that, I am getting field Heading values in 1st page only. I need field values in remaining page also.

 

Like

E.No    Name   Company

----       --------   ---------------

 

I want this heading in all pdf pages

 

 

Please help me.

 

Hi,

 

I am uploaded Image.

 

I developed Custom Visualforce for the Reports in this 4 fields

Name        Address       Phone       Role

aaa

                                         123             Manager

xxx               aaa             

 

 

 

I want  '--' like this when feilds are empty.

 

 

 

 

 

 

Please see and do the needful.

 

 

continue lines

Hi,

 

 

I want to merge the Open Activity and Activity History into a single query.

 

Please Help Me.

Hi,

 

I generated pdf file using vf. In footer I'm  able to add current date and page no. But  I'm anble to add left side is current date and right side is page no.

 

 

Please Help Me.

Shravan

Hi,

 

When closing Salesfoce page I have to get the alert like 'do you want close the page' . Like that I have to get the message when I am closing My salesforce Tab.

 

Please Help Me.

Hi,

 

When I am clicking on sharing button. In sharing page search lable picklist getting users, roles, roles and subordines, public group. In this one I have to romove/Hide the roles and subordinates in picklist.

Or

If I am selecting Roles or  Roles and Sub to get meggage like 'your are unable to share using Roles, Roles & Sub'

 

 Please Help me.

Hello,
I have created app related to university.In this for Student object I need to show some information in one table with 4 columns.So I created table.But now I want to show this table to my Students tab(Object:Student).I created a section named course details on Student object,in this section I want to show this table.So how can I use my visualforce code there?

I tried overriding by using  'Buttons, Links, and Actions' but then it's come up with just a one section(only VF code).
I have two section in my tab  (1. Student Detail ,2.Course Detail) . And I want to replace this Course Details section  with my VF code. And want to keep Student Detail section as it is.
Please guide.
Thanks.

 
 
Your support team has asked for improved visibility on account activity level at the time they’re helping with customer issues. Specifically, when they’re looking at a case, they’d like to see an at-a-glance view of the number of days since the case’s related account was last active. Create the formula using these requirements.
The formula should be on the Case object.
The formula should be of return type Number.
The formula should be named 'Days Since Last Update' and have a resulting API Name of 'Days_Since_Last_Update__c'.
The formula should return the number of days between the account’s Last Activity Date and today.

FORMULA I USED :

TODAY() - Account.Last Activity Date.
i created the object named 'Days Since Last Update' on Case.

THE ERROR IS : 

There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Last_Activity_Date__c]: [Last_Activity_Date__c].

Anyone do help me, please.
  • November 04, 2016
  • Like
  • 0
trigger AS_OpportunityUpdateFromOppProduct on OpportunityLineItem (after insert) {
   system.debug('trigger values'+ trigger.new);  
    String  oppoptyId = [ SELECT Id,Name,OpportunityId,PricebookEntryId,Product2Id FROM OpportunityLineItem where Id IN: trigger.new limit 1].OpportunityId;
    system.debug('Opporutity id'+ oppoptyId);
      List<OpportunityLineItem> OPtyLineItemList = [select Id,Name,OpportunityId,PricebookEntryId,Product2Id,Contractual_Committed_Revenue__c FROM OpportunityLineItem Where OpportunityId =: oppoptyId];
      system.debug('lineitem list '+ OPtyLineItemList );
      opportunity opty =[Select product_1__C,product_2__C from Opportunity where ID =: oppoptyId];
        system.debug('opty list '+ opty.product_1__C);
        system.debug('opty list '+ opty.product_2__C );
      Map<Double,OpportunityLineItem> productAlignmentTOOpty = new  Map<Double,OpportunityLineItem>();
      List<Double> sortRevenue = new List<Double>(); 
         for(OpportunityLineItem Oli: OPtyLineItemList){
            productAlignmentTOOpty.put(oli.Contractual_Committed_Revenue__c,Oli);
            sortRevenue.add(oli.Contractual_Committed_Revenue__c);   
         }
         system.debug('sortRevenue1 '+ sortRevenue );
        sortRevenue.sort();
         Integer count = 0;
          system.debug('sortRevenue2 '+ sortRevenue);
         for(Integer i=0 ;sortRevenue.Size()> count ; i++){
            if(count == 0 && sortRevenue[i] != null && productAlignmentTOOpty.get(sortRevenue[i]).Name != null){
              opty.product_1__C = productAlignmentTOOpty.get(sortRevenue[i]).Name;
            }
             if(count == 1 && sortRevenue[i] != null  && productAlignmentTOOpty.get(sortRevenue[i]).Name != null){
              opty.product_2__C =productAlignmentTOOpty.get(sortRevenue[i]).Name;
            }

            count = count +1;
         }
         update opty;
}

I need to sort the values in asc from the field Contractual_Committed_Revenue__c and populate the lineitem names in opportunity fields (product_1__C,product_2__C).

Thanks in advance..
 
I'm getting this error message when trying to save this Apex class (embbeded SOQL query). 

User-added image

Any solutions ? 
Requirements of the custom link are to take the user to an email screen where the email is addressed to a public group or queue. We have launched an internal community that houses our Ideas object.  We need to add a custom link in the home page sidebar that allows the user to send a comment to the Idea Moderators public group.  The purpose for this link is to give our employee community members a way to flag ideas they want to bring immediate attention to the Moderators only, in cases where the idea is exceptional, or questionable, and it needs immediate review.  This may require building a VF page and trigger, but I am not a developer yet and would need some help to build the VF page and trigger.
 i am entering new values in account if phone is anything in account that must be same related contact phone and create related contact for that account.so its firing. but, after this i want to check the checkbox field in account thats not firing pls hlp me

trigger creatingcasebasedonaccounttrigger on Account (after insert) 
{
    list<schema.contact> lst = new list<schema.contact>();
    list<account> gh = new list<account>();
     list<Id> listIds = new List<Id>();
    
   //schema.accc=new schema.contact();
   if(trigger.isafter) 
   {
       if(trigger.isinsert)
       {
          for(account acc:trigger.new) 
          {
             System.debug('@@@@id is: ' + acc.Id);
            System.debug('####name is : ' + acc.Name);
            if(acc.phone !=null)
            {
            schema.contact cs = new schema.contact();
                  //cs.Account=acc.Name;
                  cs.lastname=acc.name;
                 //cs.closed Date='';
                  cs.accountid =acc.id;
                  cs.phone=acc.phone;
                  cs.contactrelaioncheckbox__c=true;
                  lst.add(cs);
          
                
              }
          }
       }
    //acc.CHECKEDACCOUNT__c=true;
     insert lst; 
      
       
 list<account> lk =[select id,name,CHECKEDACCOUNT__c from account where id in:listIds];
         for(account an:lk)
         {
             an.CHECKEDACCOUNT__c=true;
             gh.add(an);
         }
       
   }
           update gh;
         
   }

 

Is it possible to use more than 2 variable in a for loop.

i tried this

for(integer j=0, k=1; j++,k++) {

}

and getting this error

Error: Compile Error: expecting a right parentheses, found ',' at line 188 column 53

 

Please help me to find the solution.

Thanks

Anu

Hi All,

 

Help me to write a test class for below code,

 

public void storeProducts(){


XmlStreamWriter w = new XmlStreamWriter();


        w.writeStartElement(null, 'Product', null);
         w.writeStartElement(null, 'Id', null);
         w.writeCharacters(p.Id);
         w.writeEndElement();

              ...............

           ..................

             .............................

}

 

Test class: I have written test class as,

 

static TestMethod void storeProducts (){

XmlstreamWriter demo = new XmlstreamWriter();
          string result=demo.getXmlstring();
          string expected='<?xml version="1.0"?><?Products?>' + '<m:Product>' + '<00190000009rvgY>'; // is any other way to represent this line//
        System.assert(result == expected);

}

 

Failure: System.AssertException: Assertion Failed


 

Thanks in Advance.

Hi,

 

how to check unbrekable word in apex:

 

Ex: String name1 = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; // unbrekable word

       

Don't check  if name1 like  ' ' (space).

 

 

Please Reply ASAP

 

Regards,

Shravan

 

Hi,

 

I have two object names as emp and emp1. In emp i have a loop up with emp1. I am created a visual force page with button and i am placing that visual force page in detail page section of emp object. If i click on the button,The new record is created in emp1 object when the look up of emp is null. If the lookup field is not null want to update the record of emp1. This is worked fine for me. Now My Requirement is displayed thepop up with 'Yes' and Cancel Buttons. I we click on the Yes want to update Other wise not. It is worked fine for me when i am run the vf page individually. But in the detail page section the pop up is not displayed when the button click.Please help me. How to solve this.

 

 

Thanks,

Lakshmi

Hi,

 

 

I genereated pdf file In that, I am getting field Heading values in 1st page only. I need field values in remaining page also.

 

Like

E.No    Name   Company

----       --------   ---------------

 

I want this heading in all pdf pages

 

 

Please help me.

 

Hi,

 

I am uploaded Image.

 

I developed Custom Visualforce for the Reports in this 4 fields

Name        Address       Phone       Role

aaa

                                         123             Manager

xxx               aaa             

 

 

 

I want  '--' like this when feilds are empty.

 

 

 

 

 

 

Please see and do the needful.

 

 

continue lines

Hi,

 

When closing Salesfoce page I have to get the alert like 'do you want close the page' . Like that I have to get the message when I am closing My salesforce Tab.

 

Please Help Me.

Hello All,

 

please send me the link or dumes on my email id dhirajmanpe@gmail.com

 

--

Thanks