• venkyyy
  • NEWBIE
  • 40 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 41
    Questions
  • 21
    Replies

Hi all,

I have one softphone in my organization and i want to be implement that in lightning also, for that i want to get the soft phone on lightning mobile to adjest the UI Look and field.
Below steps i followed:

1) Enabled lightning in my organization.
Step1

2) Swhiched into lightning Experience

 Step2
3) While pressing F12 it should be come in mobile mode along with soft phone, but i am unable to see the softphone in this step.

Note: But i can get the softphone in Salesforce classic Mode.

Please provide me the solution to get the softphone in lightning mobile mode.
 


Thanks in advance.

Hi all,
i want to assign a visualforce page to a custom button, may i know what r the possibilites all we have in our SFDC, Explenation on each will help to me and to all as well... :)

Thanks in advance,
Venky.
Hi all,
i want to assign a visualforce page to a custom button, may i know what r the possibilites all we have in our SFDC, Explenation on each will help to me and all as well... :)

Thanks in advance,
Venky.
Hi all,

Plz Suggest me how to Handle more than 1000 Records in VF page select list.

Thanks in advance.
Hi all, 
i am going to design a vf page as login and i want to be place my text boxes and other dropdown fields in perticuler place, means want to adjest into my own place in screen.

Can anybody please advice me to achive it.. 

Thanks in advance.
Hi Experts,
In what scenarios this ( "List has no rows for assignment to SObject" ) error will come ??
Please give me explenation,,

Thanks in advance.
 
Hi can anybody give me test class for the following method.
-----------------
 public PageReference addAllUsers(){
        try{
            integer cnt = 0;
            String payload = '';
            
            List<SkillUserSaveModel> users = new List<SkillUserSaveModel>();
            List<string> agentIdList = new List<string>();
            for (SkillUnassignedAgentModel userModel : SkillUnassignedUsers.resultSet.agents) {
                if (cnt > 0){
                    payload += '&';
                }
                payload += 'agents[' + string.valueOf(cnt) + '][agentId]:' + userModel.agentId;
                payload += '&agents[' + string.valueOf(cnt) + '][isActive]:' + 'true';
                payload += '&agents[' + string.valueOf(cnt) + '][proficiency]:' + getProficiencyId('Medium');
                cnt++;
            }
            payload = EncodingUtil.urlEncode(payload, 'UTF-8');
            payload = payload.replace('%3A', '=');
            payload = payload.replace('%26', '&');
            
            System.debug('addAllUsers payLoad :: ' + payload);
            
            String result = ApiClient.addSkillUsers(skillId, payload);
            
            SkillAssignedUsers = ApiClient.getSkillAgents(skillId);
            SkillUnassignedUsers = ApiClient.getSkillUnassignedAgents(skillId);
        }
        catch(ApiResponseException apiEx ) {    
            IsInvalid = true;     
            ApexPages.Message errorMsg = new ApexPages.Message(ApexPages.Severity.ERROR, apiEx.ErrorDescription);
            ApexPages.addMessage(errorMsg);   
        } 
        catch(Exception e) {
            System.debug(logginglevel.ERROR, 'Error in addAllUsers:' + e.getMessage());
            IsInvalid= true;
            ApexPages.Message errorMsg = new ApexPages.Message(ApexPages.Severity.ERROR, 'Error occurred. ' + e.getMessage());
            ApexPages.addMessage(errorMsg); 
        }
        return null;
    }
-----------------------------
Hi all,
Can anybody give me the complete code coverage lines for the follwoing class(only one method i have copied bellow, means its not full class, i  need to cover these lines only to fullfill my class code coverage):

public class getusers{
 public PageReference modifyUsers() {
        PageReference skillPage = Page.skill;
        //Set the skill id if it is set from skill list
        if(String.isNotBlank(skillId)) {
            skillPage.getParameters().put('id', skillId);
            skillPage.getParameters().put('act', 'eu');
        }
        skillPage.setRedirect(true);
        return skillPage;
    }
}
----------------
Hi all, 

I have a VF-Page for NewCollege, through this i am going to insert new college to some other database using API(not into custom or standard object), now my question is how can i give defalut value for a text box(if the text box is in some custom or standard object we can give while the field creation itself, but this field is from API,). so how can i give default value while declaring in visualforce page. 

and also after text box i want to show some text as shown in bellow screen. give me suggestion to achive it.

User-added image

Thanks in advance.
 
  • September 22, 2015
  • Like
  • 0
Hi all, 

I have a page which is retreving data through Rest API which is showing in pageblock table, as show in bellow screen.

User-added image

Here my question is i dont want to show the entire rows where the TestFld data is  'No' .
 To achive this : 1) I can not write a SOQL query with where condition because data coming from API, not from custom or standard object.
                        2) Also i can not write the rendered for each column, reason is i dont know what are the exact columns coming from API.
                        **Please provide me any code for an example. 
                         
Thanks in advance, 
Venkyy.
  • September 12, 2015
  • Like
  • 0
Hi, 
Can anybody give me test class for the following class, so that i can learn by each and every line( i am new to test classes).
---------------
public with sharing class acSearch {

    public String acclist { get; set; }
    public String AcPhone { get; set; }
    public String AcName { get; set; }
    public list<account> lst{get;set;}


    public pageReferece Search() {
    list<account> lstt = [select id,name,type,industry,phone from account];
    lst = new list<account>();
    for(account a: lstt){
        
        if(AcName == a.name & AcPhone == a.phone){
        account ac = new account();
        ac.Name = a.name;
        ac.Phone = a.phone;
        lst.add(ac);
        }
    }
        return null;
    }
    
}
--------------------

Thanks in advance.
  • September 11, 2015
  • Like
  • 0
Hi all,

I am going to create a package which consists apex classes, vf pages, custom settings, static resources.
now my question is i have created some custom labels and called in visual force pages, can i create package along with custom labels??

Thanks in advance.
 
  • September 10, 2015
  • Like
  • 0
Hi all,

Please have a look on bellow code, and i have to show error message that if there is no data.
-----------------page-----------
<apex:page controller="controllerError">
<apex:pageBlock >
    <apex:pageBlockSection >
        <apex:pageBlockTable value="{!lst}" var="con" rendered="{ !IF(lst.size() == 0,True,False)}">
            <apex:column value="{!con.TestField__c}"/>                                  
        </apex:pageBlockTable>
    </apex:pageBlockSection>

    <apex:outputText rendered="{ !IF(lst.size()== 0,True,False)}" value="There are no contacts to display." />
    
</apex:pageBlock>
</apex:page>
----------------controller-------
public with sharing class controllerError {
    
    public list<Contact> lst{ get; set;}
    
    public controllerError(){
     lst = [select name,TestField__c from contact];
    }
    
}
-----------
suggest me what i need to add.
  • September 08, 2015
  • Like
  • 0
Hi all,

I am trying to get the records through pageblock table, in that if i scroll down for next records the column heading are not go up(fixed headings without using javascript..), for that can anybody give suggestion to achive it.

Thanks,
Venky.
 
  • September 02, 2015
  • Like
  • 0
HI Experts,,

Here i came  with a query that my VF-Page is getting load a bit late while clicking on tab(because it has to call API) for that i want to show UI first(i.e while loading a page,,) after calling API the data can be populated.
Any Suggestion will inspire me to achive it.

Thanks in advance.

 
Hi Folks,

After running test class, am able to see the percentage of the code covered, but unable to see covered code lines in developer console or any where.

Let me know if any body got this issue, and wat is the get rid of this issue.

Thank you in advance..
Hi all,
I have loaded account details in visualforce page through pageblock table, if data exceeds the page it has to show scroll down, if i scroll down the column headers should not be scroll down.
Bellow is my code. and what lines i need to add for bellow code.
---------------
<apex:page standardController="Account" recordSetVar="rcst">
    <apex:form >
        <apex:pageBlock title="Accounts" >
            <div style="overflow: auto; height: 200px;" layout="block" position ="fixed">
                <apex:pageblockTable value="{!rcst}" var="a" headerClass="headerStyle" width="100%">
                    <apex:column value="{!a.Id}" ></apex:column>
                    <apex:column value="{!a.Name}" ></apex:column>
                    <apex:column value="{!a.type}" ></apex:column>
                    <apex:column value="{!a.industry}"></apex:column>
                <apex:inlineEditSupport />
                </apex:pageblockTable>
            </div>                                        
        </apex:pageBlock>
    </apex:form>
</apex:page>

Thanks.
Hi all,
Can we export custom labels(names) and values to excel?


Thanks,
venkat.
Hi all, 

I have created a trigger for my scenario and i wrote test class for that as i copied bellow and please help me out what mistake i did in test class, 

Trigger is: 
----------------
trigger DelearNotToUpdateCase on Case (before Update) {        
    
    Profile ProfileName = [select Name from profile where id = :userinfo.getProfileId()];
    if(ProfileName.Name =='vinod_cs' && UserUtil.CurrentUser.ContactId == Null){    
        if (trigger.isupdate){
                 for( Case cnew : Trigger.new){
                       Try{
                        if(cnew.CreatedDate != Null && cnew.prasads__no_of_comments__c == Trigger.oldMap.get(cnew.id).prasads__no_of_comments__c && cnew.prasads__apex_update__c == Trigger.oldMap.get(cnew.id).prasads__apex_update__c ){
                            system.debug('>>>>>>>You may not edit a case once it has been created. Please create a new case comment at the bottom of the page to request your changes.<<<<<<<<<<');
                            Trigger.newMap.get((Id)cnew.get('Id')).addError('You may not edit a case once it has been created. Please create a new case comment at the bottom of the page to request your changes.'); 
                            }
                         }Catch(exception e){ }
                  }
           }
    }
 
}
------------------------
Test class is : 
@isTest

public class DelearNotToUpdateCaseTest {


       Static testmethod void NotupdateTest(){
        
        DelearNotToUpdateCase scc = new DelearNotToUpdateCase(); 
        Profile ProfileName=new Profile();
        ProfileName.Name='vinod_cs';
        profilename=[Select name from profile where name='vinod_cs'];
        system.assertEquals(profileName.Name,'vinod_cs');
       
        list<Case> ca=new list<case>();
        ca=[Select id,createdDate, status,origin from case];
        case c=new case();
        c.status='New';
        c.Origin='Phone';
        c.no_of_comments__c= 12;
        c.apex_update__c=11;
       // c.CreatedDate= System.today();
        ca.add(c);
        insert ca;
        
        system.assertEquals(c.Status,'New');
        System.assertEquals(c.Origin,'Phone');
        
        
        casecomment cm=new casecomment();
        
        cm.IsPublished=false;
        cm.CommentBody='Test';
        cm.ParentId=c.id;
        insert cm;
        System.assertEquals(cm.IsPublished,False);
        system.assertEquals(cm.CommentBody,'Test');
        system.assertequals(cm.ParentId,c.Id);
        
        
    }
}
Hi all,

If i select a record which is in console app, it is giving the detail page in seperate tab.

In Console app design is like bellow image:
User-added image
Now my question is i want to design  a vf page, The designed the tabs in sales application like console app as shown above image.

Help me out.
Hi all, 
1) Can we add a visualforce page in lightning component?
2) Can we create two apex controllers in one lightning component?

Thanks for help in advance.
Hi all, 
i am going to design a vf page as login and i want to be place my text boxes and other dropdown fields in perticuler place, means want to adjest into my own place in screen.

Can anybody please advice me to achive it.. 

Thanks in advance.
Hi, 
Can anybody give me test class for the following class, so that i can learn by each and every line( i am new to test classes).
---------------
public with sharing class acSearch {

    public String acclist { get; set; }
    public String AcPhone { get; set; }
    public String AcName { get; set; }
    public list<account> lst{get;set;}


    public pageReferece Search() {
    list<account> lstt = [select id,name,type,industry,phone from account];
    lst = new list<account>();
    for(account a: lstt){
        
        if(AcName == a.name & AcPhone == a.phone){
        account ac = new account();
        ac.Name = a.name;
        ac.Phone = a.phone;
        lst.add(ac);
        }
    }
        return null;
    }
    
}
--------------------

Thanks in advance.
  • September 11, 2015
  • Like
  • 0
Hi all,

Please have a look on bellow code, and i have to show error message that if there is no data.
-----------------page-----------
<apex:page controller="controllerError">
<apex:pageBlock >
    <apex:pageBlockSection >
        <apex:pageBlockTable value="{!lst}" var="con" rendered="{ !IF(lst.size() == 0,True,False)}">
            <apex:column value="{!con.TestField__c}"/>                                  
        </apex:pageBlockTable>
    </apex:pageBlockSection>

    <apex:outputText rendered="{ !IF(lst.size()== 0,True,False)}" value="There are no contacts to display." />
    
</apex:pageBlock>
</apex:page>
----------------controller-------
public with sharing class controllerError {
    
    public list<Contact> lst{ get; set;}
    
    public controllerError(){
     lst = [select name,TestField__c from contact];
    }
    
}
-----------
suggest me what i need to add.
  • September 08, 2015
  • Like
  • 0
Hi all,

I am trying to get the records through pageblock table, in that if i scroll down for next records the column heading are not go up(fixed headings without using javascript..), for that can anybody give suggestion to achive it.

Thanks,
Venky.
 
  • September 02, 2015
  • Like
  • 0
HI Experts,,

Here i came  with a query that my VF-Page is getting load a bit late while clicking on tab(because it has to call API) for that i want to show UI first(i.e while loading a page,,) after calling API the data can be populated.
Any Suggestion will inspire me to achive it.

Thanks in advance.

 
Hi all,
I have loaded account details in visualforce page through pageblock table, if data exceeds the page it has to show scroll down, if i scroll down the column headers should not be scroll down.
Bellow is my code. and what lines i need to add for bellow code.
---------------
<apex:page standardController="Account" recordSetVar="rcst">
    <apex:form >
        <apex:pageBlock title="Accounts" >
            <div style="overflow: auto; height: 200px;" layout="block" position ="fixed">
                <apex:pageblockTable value="{!rcst}" var="a" headerClass="headerStyle" width="100%">
                    <apex:column value="{!a.Id}" ></apex:column>
                    <apex:column value="{!a.Name}" ></apex:column>
                    <apex:column value="{!a.type}" ></apex:column>
                    <apex:column value="{!a.industry}"></apex:column>
                <apex:inlineEditSupport />
                </apex:pageblockTable>
            </div>                                        
        </apex:pageBlock>
    </apex:form>
</apex:page>

Thanks.
Hi all, 

I have created a trigger for my scenario and i wrote test class for that as i copied bellow and please help me out what mistake i did in test class, 

Trigger is: 
----------------
trigger DelearNotToUpdateCase on Case (before Update) {        
    
    Profile ProfileName = [select Name from profile where id = :userinfo.getProfileId()];
    if(ProfileName.Name =='vinod_cs' && UserUtil.CurrentUser.ContactId == Null){    
        if (trigger.isupdate){
                 for( Case cnew : Trigger.new){
                       Try{
                        if(cnew.CreatedDate != Null && cnew.prasads__no_of_comments__c == Trigger.oldMap.get(cnew.id).prasads__no_of_comments__c && cnew.prasads__apex_update__c == Trigger.oldMap.get(cnew.id).prasads__apex_update__c ){
                            system.debug('>>>>>>>You may not edit a case once it has been created. Please create a new case comment at the bottom of the page to request your changes.<<<<<<<<<<');
                            Trigger.newMap.get((Id)cnew.get('Id')).addError('You may not edit a case once it has been created. Please create a new case comment at the bottom of the page to request your changes.'); 
                            }
                         }Catch(exception e){ }
                  }
           }
    }
 
}
------------------------
Test class is : 
@isTest

public class DelearNotToUpdateCaseTest {


       Static testmethod void NotupdateTest(){
        
        DelearNotToUpdateCase scc = new DelearNotToUpdateCase(); 
        Profile ProfileName=new Profile();
        ProfileName.Name='vinod_cs';
        profilename=[Select name from profile where name='vinod_cs'];
        system.assertEquals(profileName.Name,'vinod_cs');
       
        list<Case> ca=new list<case>();
        ca=[Select id,createdDate, status,origin from case];
        case c=new case();
        c.status='New';
        c.Origin='Phone';
        c.no_of_comments__c= 12;
        c.apex_update__c=11;
       // c.CreatedDate= System.today();
        ca.add(c);
        insert ca;
        
        system.assertEquals(c.Status,'New');
        System.assertEquals(c.Origin,'Phone');
        
        
        casecomment cm=new casecomment();
        
        cm.IsPublished=false;
        cm.CommentBody='Test';
        cm.ParentId=c.id;
        insert cm;
        System.assertEquals(cm.IsPublished,False);
        system.assertEquals(cm.CommentBody,'Test');
        system.assertequals(cm.ParentId,c.Id);
        
        
    }
}
Hi,

I have a javascripit which is return one value, that javascript has to run when i selected an user in Manageusers>>users>>venkyy(that is when page gets loaded).

** The javascript is in static resource.

Thanks in advance.
Hi all, 

In user detail page there is a field called 'Phone' and i want to add a custom button/link Beside the Phone field not in the standard button and custom button location in pagelayout.

Please see the screen which i uploaded.
User-added image
Thanks in advance.
 
Hi all,

I have created a lightning component trhough Developer console along with the lightning app and style too.
Now my question is that how can i add that component into the dashboad (which is into existed dashboard.)

Please guide me.
Thanks in advance.
Hi all, 
I have a scenario that i want to schedule a batch class for every minute even if user get logged out.
for that i just created one basic batch class which i want to get in debug (please have a look bellow code).

if i run this throug execute ananomus window, it throws an error is: Invalid token "helloworld".

give me the lines what r the modifications i need to do.

batch class is1:
--------------------------
global class SampleBatchClass implements Database.Batchable<sObject>{

      // Start Method
        global Database.QueryLocator start(Database.BatchableContext BC){
        string query = 'hellow world';
         return Database.getQueryLocator(query);
        }
      
      // Execute Logic
       global void execute(Database.BatchableContext BC, List<sObject>scope){

             system.debug('>>>>>inside batcg<<<<<<<<<<'+scope);   
     
       }
     
       global void finish(Database.BatchableContext BC){
            // Logic to be Executed at finish
       }
    }

scheduled class is :
--------------------------------
global class sampleschdeulerclass implements schedulable
{
    global void execute(SchedulableContext sc)
    {
    SampleBatchClass sbc = new SampleBatchClass(); 
      database.executebatch(sbc);
      system.debug('>>>>>>>>inside schedule class<<<<<<<<<');
    }
}
Hi all, 
I wrote an batch apex class, 
Till now i wrote 15 Test classes in my experience so that i am not able to create a test class to the bellow class in proper way, can any body explain me with the test class,  it gets healpfull to me to my practice,,,, Thanks in advance,, 

The class is: 
------------------------
global class batchAccountUpdate implements database.batchable<sObject>{
    
    global database.querylocator start(database.batchablecontext bc){
        string sql = 'select id,name from account';
        return database.getquerylocator(sql);
    }
    
    global void execute(database.batchablecontext bc, list<account> scope){
        list<account> lst = new list<account>();
        for(account a:scope){
            a.name = a.name+'updateddd';
        }
        update scope;
    }
    
    global void finish(database.batchablecontext bc){}
}
Hi, 
The code was not working that i have created to update account name.

If the account Gender is 'M' then i want to update account name with the prefix of 'Mr.'
If the account Gender is 'F' then i want to update account name with the prefix of 'Ms'.

Following code i did, but it does'nt works.
-----------------------------------------------------
global class AcPrefixMaleFemale implements database.batchable<sObject>{
    
    global database.querylocator start(database.batchablecontext bc){
        string sql = 'select id,name,Gender__c from account';
        return database.getquerylocator(sql);
    }
    
    global void execute(database.batchablecontext bc, list<account> scope){
        list<account> lst = new list<account>();
        for(account a:lst){
            if(a.Gender__c == 'M'){
                a.Name = 'Mr.'+a.Name;
                lst.add(a);
            }
            if(a.Gender__c == 'F'){
                a.Name = 'Ms.'+a.Name;
                lst.add(a);
            }
        }
        update lst;
    }
    
    global void finish(database.batchablecontext bc){}
    
}
 
Hi all,
Help me out from this,
Here i came with a situation that i have created a batch apex to give 'Mr.' as a  prefix of every account name(the code was copyed bellow), and i executed this batch class using execute anonymous window using bellow 2 lines

batchAccountUpdate b1 = new batchAccountUpdate();
database.executeBatch(b1);

By mistake i have executed 3 times that anonymous block, so that the name of account  prefix 'Mr.' was updated 3 times for all accounts(like:   'Mr.Mr.Mr.Balu'), so now
I want to delete two Prefixes that 'Mr.'(Final Result wants to be like:   'Mr.Balu')

And the batch class is::
global class batchAccountUpdate implements Database.Batchable<sObject> {
    global Database.QueryLocator start(Database.BatchableContext BC) {
        String query = 'SELECT Id,Name FROM Account';
        return Database.getQueryLocator(query);
    }
   
    global void execute(Database.BatchableContext BC, List<Account> scope) {
         for(Account a : scope)
         {
             a.Name = 'Mr.'+ a.Name;            
         }
         update scope;
    }   
    
    global void finish(Database.BatchableContext BC) {
    }
}

Thanks in advance.
Hi all, 
Please clarify my doubt,
My Question is: through controller i want to save account record, after saving perticular record i want to be stay on corresponding detail page itself.  Please see the bellow vf page and apex class and suggest me what i need to add to get detail page.
Thanks in advance,
venkat.

The Page is:
------------------
<apex:page controller="SaveAccount">
  <apex:form >
    <apex:pageblock title="Enter Account Details">
       <apex:pageblockSection >
          <apex:inputtext value="{!AcName}" label="Acc_Name"/>
          <apex:inputtext value="{!AcPhone}" label="Acc_Phone"/>
       </apex:pageblockSection>
       <apex:pageblockButtons location="Bottom" >
       <apex:commandButton action="{!Save}" value="Save"/>
       </apex:pageblockButtons>
    </apex:pageblock>
  </apex:form>
</apex:page>
----------------------------------
class is:
----------------------------------
public with sharing class SaveAccount {

    public PageReference Save() {
    account ac = new account();
    ac.name = AcName;
    ac.phone = AcPhone;
    insert ac;
        return null;
    }
    public String AcPhone { get; set; }
    public String AcName { get; set; }
}

 
Hi all,
I have created a small example class which is copied bellow and also test class to that, it is running fine but the code coverage was 75% only, 
what i need to add if i want to get 100% of code covearage., please help me out from this,  Thanks in advance

The class is:
public class ex2 {
 
    public integer a,b,c;
    
    public void dis(){
       
        if(a>b){
           c = a + b;
        }
        else {
            c = a - b;
        }
        
    }  
}

Test Class is:
-----------------
@isTest
public class ex2Tesst{

    public static testmethod void ex2tesstmethod01(){
        ex2 e = new ex2();
        e.a = 2;
        e.b = 1;
        e.dis();
    }
    
    public static testmethod void ex2tesstmethod02(){
        ex2 e1 = new ex2();
        e1.a = 2;
        e1.b = 1;
        e1.dis();
    }
}