• Sam Swann
  • NEWBIE
  • 20 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 13
    Replies
Hi

I am using: lightning:buttonMenu for the user menu in my portal.
I am not sure how to set params to have the appropriate URLs to.
 User-added image

User-added image
User-added image

Any suggestions are welcome.
Hi

I am working on a community and I got to a requirement where I need to have a custom Profile Header(drop down with four items).
I need to incorporate this new development with an existing Lightning component in an exisiting Header section.

Please help me out.

Thanks,
Sam



 
Hi

I am working on Communities, where I wanted to replace the Salesforce Standard title tag's text: Home with my custom text. 
I have made changes to "Head Markup" from Advanced settings in Community Builder by adding title tag with Custom text, but even, I am getting Home as Browser's tab.

I can see, the tab loads with my custom text, but after completion of the loading, it is changing back to Home text.
Where can I remove or change preference to not to use this Head title?

Please respond to me with even a question, that way I can move forward with my progress.

Thanks
Hi,

For my Salesforce Community, I have implemented a Lighinging header component which holds all the top navigations and company's logo.
Now I wanted to take down the Salesforce Cloud favicon and the Tab text(label) with my company's logo (favicon 16X16 icon) and custom text on the tab.

How to implement in a Lightning component?

Tried using this code in the header section, which didn't worked:
<link rel="shortcut icon" href="{!$Resource.Source + '/Source/favicon.ico'}" type="image/x-icon" />
Please help me. All answers are welcomed. 
Thanks
Hi,

For my Portal, I have implemented a Lighinging header component which holds all the top navigations and company's logo.
Now I wanted to take down the Salesforce Cloud favicon and the Tab text(label) with my company's logo (favicon 16X16 icon) and custom text on the tab.

How to implement in a Lightning component?

Thanks. 
Hi

I am new to Lightning Component development.
I have a method in my controller.js for validation check.
validateEmptyField : function(component) {
        var cmpValue = component.get("v.value");
        if ($A.util.isEmpty(cmpValue) || $A.util.isUndefined(cmpValue)){
            component.set("v.errors", [{message:"Field cannot be empty. Please enter valid data."}]);
            return false;
        }
        
        return true;
    }
I do have like 8 attributes for the v.value. 
How can I make 7 attributes to have this validation check and not for one field?

I need to extract that field from cmpValue, but I am not sure which default method to call.

Thanks
 

Hi

Can someone help me with sending an email via Apex class?

Scenario:
Recipient: sammypuppy09876@gmail.com
Sender: no_reply@sammypuppy.com
Subject: "User Login Failed" 
Text: "My Custom Text with one field from above user record" 

I did workflow as well to sent out the email, but now I wanted to do same customization via Apex code (learning curve).

Thanks

Hi

I am new to this Single-Sign-on configuration.
I have customized the autogenerated Jit handler Apex class to insert/update the user record as per my requirement. 

While writing a test class for this auto-generated Jit handler class, I am running into some errors. 

Here are the methods I am trying to refer from Jit handler:
 

/*Create User */
global User createUser(Id samlSsoProviderId, Id communityId, Id portalId,
		String federationIdentifier, Map<String, String> attributes, String assertion) {
		User u = new User();
		handleJit(true, u, samlSsoProviderId, communityId, portalId,
			federationIdentifier, attributes, assertion);
		return u;
	}

/*Update User */
global void updateUser(Id userId, Id samlSsoProviderId, Id communityId, Id portalId,
		String federationIdentifier, Map<String, String> attributes, String assertion) {
		User u = [SELECT FirstName, LastName, Phone, Email FROM User WHERE Id=:userId];
		handleJit(false, u, samlSsoProviderId, communityId, portalId,
			federationIdentifier, attributes, assertion);
	}

/*Jit Handler method */
private void handleJit(boolean create, User u, Id samlSsoProviderId, Id communityId, Id portalId, String federationIdentifier, Map<String, String> attributes, String assertion) {
		if(communityId != null) {
			handleUser(create, u, attributes, federationIdentifier, false);
		} else {
			handleUser(create, u, attributes, federationIdentifier, true);
		}
	}

/*HandleUser method*/
// This method has some basic insert and update User fields based on my requirement.

Can someone please help me out writing a test class and methods that call the above methods?

Thanks
Hi,

I was finding this issue so annyoed that I am starting to hate developing code in the Developer Console.
I don't know if this was an issue to everyone OR only to me OR only with Macbook(OS: 10.11.6) OR for whatever the reason.

Issue:
On the Developer conole, when I am trying to using two finger scroll gesture on the trackpad of my Macbook Pro (15" Late 2015) model, the cursor jumps way back to the some 10-15 lines above/below based on which direction I am scrolling.

Developer API Version: 39.0 (Latest at this very moment)

Can someone shed some light on the issue and fix, I would love developing using Developer Console.

Thanks 

 

Hi,

I wanted to remove a user if the user's profile is changed or if I make user inactive. 
Here is the part of code I am working on, which throws me an error:

        EXCEPTION_THROWN [41]|System.ListException: Missing id at index: 0

@future
public static void DeteleFromGroups(Set<Id> userIds){
    Group g=[SELECT Id, DeveloperName from Group Where DeveloperName='Supervisors'];  //Fetching Group 
    List<GroupMember> listGroupMember =new List<GroupMember>();        //Group member instance
    List<User> users=[Select Id, Name, User.Profile.Name, User.IsActive from user Where Id IN :userIds]; //Fetching user
   
    for (User user : users){
        GroupMember gm= new GroupMember(); 
        if((user.Profile.Name != 'Supervisor' && user.IsActive) || (user.Profile.Name == 'Supervisor' && user.IsActive == FALSE)){
                gm.GroupId=g.id;
                gm.UserOrGroupId = user.id;
               	listGroupMember.add(gm);
            }
    }
    
    if(listGroupMember.size() > 0){
        delete listGroupMember;
    	
        //delete listGroupMember[0].UserOrGroupId;
    }
  }

Please help me out in dealing with this.
Thanks!
 

Hi

I am very new to Lightning Development. I am trying to learning developing Lightning components on my own.
I was trying to develop an Input form for Case Object. Now, I wanted to Attach files feature as well to the form at the very bottom.
Once I upload and save the form, a new Case record should be created with attachments in the record detail page.

I have used this to get the Input for upload a file:
 

<lightning:input type="file" label="Attachment" name="file" multiple="true" aura:id = "upButton" accept="image/png, .zip" onchange="{! c.handleFilesChange }"/>
 

Can someone share a simple code for the controller(handleFilesChange) as well as the Server-side class to save the data to Case object.

Thanks!

Hi,

I wanted to remove a user if the user's profile is changed or if I make user inactive. 
Here is the part of code I am working on, which throws me an error:

        EXCEPTION_THROWN [41]|System.ListException: Missing id at index: 0

@future
public static void DeteleFromGroups(Set<Id> userIds){
    Group g=[SELECT Id, DeveloperName from Group Where DeveloperName='Supervisors'];  //Fetching Group 
    List<GroupMember> listGroupMember =new List<GroupMember>();        //Group member instance
    List<User> users=[Select Id, Name, User.Profile.Name, User.IsActive from user Where Id IN :userIds]; //Fetching user
   
    for (User user : users){
        GroupMember gm= new GroupMember(); 
        if((user.Profile.Name != 'Supervisor' && user.IsActive) || (user.Profile.Name == 'Supervisor' && user.IsActive == FALSE)){
                gm.GroupId=g.id;
                gm.UserOrGroupId = user.id;
               	listGroupMember.add(gm);
            }
    }
    
    if(listGroupMember.size() > 0){
        delete listGroupMember;
    	
        //delete listGroupMember[0].UserOrGroupId;
    }
  }

Please help me out in dealing with this.
Thanks!
 
Hi

I am using: lightning:buttonMenu for the user menu in my portal.
I am not sure how to set params to have the appropriate URLs to.
 User-added image

User-added image
User-added image

Any suggestions are welcome.
Hi,

For my Salesforce Community, I have implemented a Lighinging header component which holds all the top navigations and company's logo.
Now I wanted to take down the Salesforce Cloud favicon and the Tab text(label) with my company's logo (favicon 16X16 icon) and custom text on the tab.

How to implement in a Lightning component?

Tried using this code in the header section, which didn't worked:
<link rel="shortcut icon" href="{!$Resource.Source + '/Source/favicon.ico'}" type="image/x-icon" />
Please help me. All answers are welcomed. 
Thanks
Hello - Please advise how to write the following query.

Select all accounts that have at least one opportunity with the text "2016" in the name and also does not have any opportunities with the text "2017" and "2018" in the name. 

I tried my hand with reports and custom report types but as easy as this sounds no such luck.  I appreciate your help.

 
Hi,

For my Portal, I have implemented a Lighinging header component which holds all the top navigations and company's logo.
Now I wanted to take down the Salesforce Cloud favicon and the Tab text(label) with my company's logo (favicon 16X16 icon) and custom text on the tab.

How to implement in a Lightning component?

Thanks. 

Hi

Can someone help me with sending an email via Apex class?

Scenario:
Recipient: sammypuppy09876@gmail.com
Sender: no_reply@sammypuppy.com
Subject: "User Login Failed" 
Text: "My Custom Text with one field from above user record" 

I did workflow as well to sent out the email, but now I wanted to do same customization via Apex code (learning curve).

Thanks

hai
  I have 20 accounts,for 20 accounts 50k opportunities are there.common field is there in account as well as in opportunity.If  for example if i change a field in account object(Status field) then associated all opportunity status  fields  should change.One Account is having more than 10K opportunities.Can anyone say how can u achieve this with simple code

Thanks 
Sai

Hi

I am new to this Single-Sign-on configuration.
I have customized the autogenerated Jit handler Apex class to insert/update the user record as per my requirement. 

While writing a test class for this auto-generated Jit handler class, I am running into some errors. 

Here are the methods I am trying to refer from Jit handler:
 

/*Create User */
global User createUser(Id samlSsoProviderId, Id communityId, Id portalId,
		String federationIdentifier, Map<String, String> attributes, String assertion) {
		User u = new User();
		handleJit(true, u, samlSsoProviderId, communityId, portalId,
			federationIdentifier, attributes, assertion);
		return u;
	}

/*Update User */
global void updateUser(Id userId, Id samlSsoProviderId, Id communityId, Id portalId,
		String federationIdentifier, Map<String, String> attributes, String assertion) {
		User u = [SELECT FirstName, LastName, Phone, Email FROM User WHERE Id=:userId];
		handleJit(false, u, samlSsoProviderId, communityId, portalId,
			federationIdentifier, attributes, assertion);
	}

/*Jit Handler method */
private void handleJit(boolean create, User u, Id samlSsoProviderId, Id communityId, Id portalId, String federationIdentifier, Map<String, String> attributes, String assertion) {
		if(communityId != null) {
			handleUser(create, u, attributes, federationIdentifier, false);
		} else {
			handleUser(create, u, attributes, federationIdentifier, true);
		}
	}

/*HandleUser method*/
// This method has some basic insert and update User fields based on my requirement.

Can someone please help me out writing a test class and methods that call the above methods?

Thanks
Hi,

I was finding this issue so annyoed that I am starting to hate developing code in the Developer Console.
I don't know if this was an issue to everyone OR only to me OR only with Macbook(OS: 10.11.6) OR for whatever the reason.

Issue:
On the Developer conole, when I am trying to using two finger scroll gesture on the trackpad of my Macbook Pro (15" Late 2015) model, the cursor jumps way back to the some 10-15 lines above/below based on which direction I am scrolling.

Developer API Version: 39.0 (Latest at this very moment)

Can someone shed some light on the issue and fix, I would love developing using Developer Console.

Thanks 

 

Hi,

I wanted to remove a user if the user's profile is changed or if I make user inactive. 
Here is the part of code I am working on, which throws me an error:

        EXCEPTION_THROWN [41]|System.ListException: Missing id at index: 0

@future
public static void DeteleFromGroups(Set<Id> userIds){
    Group g=[SELECT Id, DeveloperName from Group Where DeveloperName='Supervisors'];  //Fetching Group 
    List<GroupMember> listGroupMember =new List<GroupMember>();        //Group member instance
    List<User> users=[Select Id, Name, User.Profile.Name, User.IsActive from user Where Id IN :userIds]; //Fetching user
   
    for (User user : users){
        GroupMember gm= new GroupMember(); 
        if((user.Profile.Name != 'Supervisor' && user.IsActive) || (user.Profile.Name == 'Supervisor' && user.IsActive == FALSE)){
                gm.GroupId=g.id;
                gm.UserOrGroupId = user.id;
               	listGroupMember.add(gm);
            }
    }
    
    if(listGroupMember.size() > 0){
        delete listGroupMember;
    	
        //delete listGroupMember[0].UserOrGroupId;
    }
  }

Please help me out in dealing with this.
Thanks!