• David Harbor
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 7
    Replies
How to fetch user details with user "(username,email)and opportunity(id,stagename) object fields based on username by using JSON 
Hey Salesforce Seo Expert!

I am looking for Salesforce Seo Expert for hire in the Greater Los Angeles area. (https://luckypatcherinfo.com/
If you or someone you know is looking for a new role in your career get in contact with me.
miraes0333@gmail.com
  • July 13, 2019
  • Like
  • 0
I want to disable personalize nav bar options for users.
Hi,  i see mixed answers all over the web regarding what is required for a SOAP Login authentication.  Some answers are Username and password and Security Token while others are saying Username and Password and Organization Id.

I think I am getting it as username and password are the only thing required and security token is optional depending on network ip settings
For communities it would be username and password and Organization id.

Can someon help me understand what is exactly required?

I'm trying to cover the following trigger:

public PageReference redirect() {
  Profile p = [select name from Profile where id = 
			   :UserInfo.getProfileId()];
  if ('Manager'.equals(p.name) 
	  || 'Client'.equals(p.name)) 
	  {
	   PageReference customPage =  Page.info;
	   customPage.setRedirect(true);
	   customPage.getParameters().put('id', recordId);
	   return customPage;
	  } else {
		  return null; //otherwise stay on the same page  
	
	  }
   }

 

At the moment  my following test class has been covering 63% of the code:

static testMethod void testoverrideCon() {

Profile pr = [select name from Profile where id = 
			   '00e34200001nqX5'];
Apexpages.StandardController stdController = new Apexpages.StandardController(new Profile()); 
    overrideCon testPRTC = new overrideCon(stdController);

    testPRTC.redirect();
    

  }

 I'm having problem to cover these specific lines:

if ('Manager'.equals(p.name) 
	  || 'Client'.equals(p.name)) 
	  {
	   PageReference customPage =  Page.info;
	   customPage.setRedirect(true);
	   customPage.getParameters().put('id', recordId);
	   return customPage;

 

Anyone have any suggestion to solution?

 

Thanks

 

 

I want to disable personalize nav bar options for users.