• PRIYATAM REDDY
  • NEWBIE
  • 60 Points
  • Member since 2014

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 9
    Replies
Hi 

Can any one helpme in integrating tableau dashboards on salesforce homepage,i just checked how to integrate on Sobjects "http://www.clearpeaks.com/blog/reporting/tableau-quick-integration-in-salesforce" with the following URL.can any one suggest how we can show them on our salesforce Homepage.

Thanks in Advance..
I would like to add ContactRoles for Particular Opportunities in Opportunity Related List.
If i click on New Button in ContactRoles, it is redirecting to another page where i can see
Contacts Lookup and the Role of Contact to be selected. If i click on Lookup icon, all the Contacts are appearing which is bad
but i only want to see the Contacts of Particular Opportunities Account.
How can i restrict other contacts to be appear in Contact Lookup?
ContactRole
What is the relation between RemedyForce, Pentaho Kettle and Salesforce, and how do we integrate and pull data from RemedyForce to different Salesforce Org?
Has any of you got Information about RemedyForce in detail.

Thanks in Advance....
Can we implement a condition in map(.sdl) file like if LastName in Contact record is NULL it should take as 'NoNameContact' by default instead of showing error:mandatory field missing and if there is a value in CSV file it should accept.

#Mapping values
#Thu Sept 25 11:19:33 GMT 2015
ID=Id
''=LastName
PHONE=Phone
MAILINGCOUNTRY=MailingCountry

If not what is alternative?
User-added image

Trying to consume WSDL file to generate apex classes and facing the error
How can i restrict users to login salesforce with same username from different sources (Desktop, Phone, Tablet) with same IP Address and similar login hours ?
How can we restrict user from accessing Salesforce.com on Internet Explorer and Mozilla apparently he should be allowed to access on google crome?
Hi All,

Can anyone help me here as to why i am getting code coverage as 0% even though my test class is running successfully?

The scenario is that i am fetching all the Frozen users from the UserLogin object and then updating a custom checkbox field on user named "Frozen" to 'True'' or 'False'. I am doing this to ensure the users who do not have access to view the standard Freeze button on user object Salesforce can indentify whether a user is frozen or not by seeing the custom Frozen field.

Below is the apex class which is working fine but the test class is showing 0% code covreage. 

Apex Class:
global class UserUpdateBatch implements Database.Batchable<sObject> {

    Public String query;

    global Database.QueryLocator start(Database.BatchableContext BC) {
       //if(!Test.isRunningTest()){
        query = 'SELECT Id, Frozen__c FROM User'+(Test.isRunningTest()?' LIMIT 200':'');
    //}  
        return Database.getQueryLocator(query);
    }

    global void execute(Database.BatchableContext BC, List<User> scope) {    
        List<Id> usrLogLst = new List<Id>();
        for(UserLogin ul : [SELECT UserId, isFrozen from UserLogin where isFrozen = true and UserId IN: scope]){
            usrLogLst.add(ul.userid);
        }
        
        for(User usr : scope){
            if(usrLogLst.contains(usr.id)){
                usr.Frozen__c = True;
            }
            else{
                usr.Frozen__c = False;
                }
               
            }
       

        Database.SaveResult [] updateResult = Database.update(scope, false);
        
        for (Database.SaveResult r : updateResult)
        
        {
            if (!r.isSuccess()) 
            {
                for (Database.Error e : r.getErrors())
            { system.debug('Error'+e); }
            
            }
        
        }
               update scope;}
        global void finish(Database.BatchableContext BC) {
    }
 }

Test Class:
@isTest

public class UserUpdateBatchTest{

Public static TestMethod Void TestActiveUser() {

        Profile p = [Select Id From Profile Where Name='System Administrator'];

        User TestUser = New User( Alias = 'testuser', Email='Moo987@testFrozenUser.com',
         LastName= 'Testme', Firstname= 'you', Languagelocalekey= 'en_US', 
        LocaleSidKey='en_US', Frozen__c = True, TimeZoneSidkey='America/Los_Angeles', ProfileId=p.id,
         UserName= 'Moo987@testFrozenUser.com', EmailEncodingKey= 'UTF-8');
        insert TestUser;

    test.StartTest();

  ID batchjobid = Database.executeBatch(new UserupdateBatch());
    System.abortJob(batchjobid);

    test.StopTest(); 

        User assertUser= [select Id, Username, Frozen__c From User Where id=:TestUser.id][0];
     
        System.assertEquals(True, assertUser.Frozen__c);
    
    }

Public Static TestMethod Void TestInActiveUser() {

        Profile p = [Select Id From Profile Where Name='System Administrator'];

        User TestUser = New User( Alias = 'Newuser', Email='Moo987@testFrozenUser.com', 
        LastName= 'Testme', Firstname= 'you', Languagelocalekey= 'en_US', 
        EmailEncodingKey= 'UTF-8', Frozen__c = False, LocaleSidKey='en_US', 
        Profileid= P.id, TimeZoneSidkey='America/Los_Angeles',
        UserName= 'Moo987@testFrozenUser.com');
        List<User> lstUsr = new List <User>();                  
        Database.SaveResult userInsertResult= Database.insert(TestUser);
        lstUsr.add(TestUser);
        UserUpdateBatch sh1 = new UserUpdateBatch();
        
        //String sch = '0 0 23 * * ?'; system.schedule('Test', sch, sh1); 
        test.StartTest();
        testUser.IsActive =False;
        Update testuser;
        
   ID batchjobid = Database.executeBatch(new UserupdateBatch());
    System.abortJob(batchJobId);
    
    test.StopTest();

        User assertUser = [Select Id, Username,Frozen__c From User Where id=:TestUser.id][0];

        System.assertEquals(False, assertUser.Frozen__c);

 }
}
Hi 

Can any one helpme in integrating tableau dashboards on salesforce homepage,i just checked how to integrate on Sobjects "http://www.clearpeaks.com/blog/reporting/tableau-quick-integration-in-salesforce" with the following URL.can any one suggest how we can show them on our salesforce Homepage.

Thanks in Advance..
I would like to add ContactRoles for Particular Opportunities in Opportunity Related List.
If i click on New Button in ContactRoles, it is redirecting to another page where i can see
Contacts Lookup and the Role of Contact to be selected. If i click on Lookup icon, all the Contacts are appearing which is bad
but i only want to see the Contacts of Particular Opportunities Account.
How can i restrict other contacts to be appear in Contact Lookup?
ContactRole
What is the relation between RemedyForce, Pentaho Kettle and Salesforce, and how do we integrate and pull data from RemedyForce to different Salesforce Org?
Has any of you got Information about RemedyForce in detail.

Thanks in Advance....
hi all,

how to create a trigger for creating a contact when account is created.

Thank you,
Suresh kumar
hi all,

please help me in creating a trigger for creating a contact when account is created.

Thank you,
Suresh kumar

Hi all,

 

Q) 

How many Sandboxes are there in Enterprise Edition?

 

Can u please help me........

 

Thanks for u r help..........

Hi,

 

I would like to know the number of full copy sandboxes and developer sandboxes available in Enterprise edition.

 

Thanks.

  • March 10, 2010
  • Like
  • 0