• Raviteja_K
  • NEWBIE
  • 0 Points
  • Member since 2019
  • Mr

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 5
    Likes Given
  • 2
    Questions
  • 4
    Replies
Let's say I have a "Test Profile" having 5 record types (Checked All) with Read and Create Object permissions. This profile was assigned to 2 users (A & B).

Now the requirement is User B needs to edit one record type(out of 5). I tried the permission set option by selecting the required record type and gave edit access (object permissions).
After adding this permission set to User B, able to edit all 5 record types instead of the selected one in the permission set.

how can I achieve edit access only for one record type for User b and read access for the remaining 4 record types?

Please let me know if you need more details..!
 
Hello All,
I am trying to Create a Hello World Lightning Web Component as mentioned in the URL below.
Hello World Lightning Web Component (https://trailhead.salesforce.com/content/learn/projects/quick-start-lightning-web-components/create-a-hello-world-lightning-web-component?trail_id=build-lightning-web-components)
But in VS code I am getting below output and did some analysis but unable to risolve it please help me how can I proceed further.

VS code output:
Starting SFDX: Authorize an Org

09:42:18.175 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername
ERROR running force:auth:web:login:  Cannot start the OAuth redirect server on port PortInUseAction. 

Try this: 
Kill the process running on port 1717 or use a custom connected app and update OauthLocalPort in the sfdx-project.json file.
09:42:23.367 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername ended with exit code 1
------------------------------Sometimes below error is coming-------------------
use a custom connected app and update OauthLocalPort in the sfdx-project.json file

Thanks in Advance :)
Let's say I have a "Test Profile" having 5 record types (Checked All) with Read and Create Object permissions. This profile was assigned to 2 users (A & B).

Now the requirement is User B needs to edit one record type(out of 5). I tried the permission set option by selecting the required record type and gave edit access (object permissions).
After adding this permission set to User B, able to edit all 5 record types instead of the selected one in the permission set.

how can I achieve edit access only for one record type for User b and read access for the remaining 4 record types?

Please let me know if you need more details..!
 
ContactComponent.cmp
<aura:component controller ="ContactController " implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
    <aura:attribute name = "conList" type = "Contact"></aura:attribute>
    <lightning:input type ="text" label = "First Name" value="{!v.conList.FirstName}" ></lightning:input>
     <lightning:input type ="text" label = "Last Name" value="{!v.conList.LastName}"></lightning:input>
     <lightning:input  type ="tel" label = "Phone" value="{!v.conList.Phone}"></lightning:input>
     <lightning:input type ="email" label = "Email"  value="{!v.conList.Email}" ></lightning:input>
     <lightning:button variant="brand" label="Create" onclick="{!c.handleClick}" class="slds-m-left_x-small"></lightning:button>
</aura:component>

ContactComponentController.js

({
    handleClick : function(component, event, helper) {
        
        console.log("HIIIIIII" + conlist);
        var action = component.get("c.createContact");
        action.setParams({
           ac : component.get("v.conList")
        });
        action.setCallback(this,function(response){
            if(response.getState() == 'SUCCESS') {
            alert("Updated successfully");
            
        }
        });
    $A.enqueueAction(action);
    }
})

ContactController.apxc

public class ContactController {
    @auraEnabled
    public static void createContact( Contact c) {
      
        insert c;
    }

}

Is there any mistake in my code
Hello All,
I am trying to Create a Hello World Lightning Web Component as mentioned in the URL below.
Hello World Lightning Web Component (https://trailhead.salesforce.com/content/learn/projects/quick-start-lightning-web-components/create-a-hello-world-lightning-web-component?trail_id=build-lightning-web-components)
But in VS code I am getting below output and did some analysis but unable to risolve it please help me how can I proceed further.

VS code output:
Starting SFDX: Authorize an Org

09:42:18.175 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername
ERROR running force:auth:web:login:  Cannot start the OAuth redirect server on port PortInUseAction. 

Try this: 
Kill the process running on port 1717 or use a custom connected app and update OauthLocalPort in the sfdx-project.json file.
09:42:23.367 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername ended with exit code 1
------------------------------Sometimes below error is coming-------------------
use a custom connected app and update OauthLocalPort in the sfdx-project.json file

Thanks in Advance :)
What is the use of  <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
Hi everyone,

I'm new to coding here, I would just like to know why do we need to subtract this value "Date(1900, 1, 7)" to a certain date to get the day of the week? I don't quite understand what's with this date? Eg "MOD( TODAY() - DATE( 1900, 1, 7 ), 7 )".

Thanks for the help.
Normally when creating Javascript methods in Visualforce they exist in the same scope, e.g. you can call one method from another with parameters. Just as the two functions findNext() and findPrev() calls findAndFocus() here:
function findPrev() {
    search_index--;
    findAndFocus(text, search_index);
}

function findNext() {
    search_index++;
    findAndFocus(text, search_index);
}

function findAndFocus(str, stop_at) {
    // Do something
}
But when using Lightning how do you call one method from another?
({
    findPrev : function (component, event, helper) {
        search_index--;
        findAndFocus(text, search_index); // What to write here?
    },
    
    findNext : function (component, event, helper) {
        search_index++;
        findAndFocus(text, search_index); // What to write here?
    },

    findAndFocus : function(text, stop_at) {
        // Do something
    }
})
What is the best practice? Is it to move all methods for reuse into the helper client side Javascript file?
What if the helper file methods need to call other methods within the same helper Javascript file?

Any thoughts or ideas?
 

Hi,

 

Is there any way that i can search for any text in a class/page while working in Developer Console. I have a long class with thousand lines of code and need to find some specific text in that class. Browsers 'Ctr + F' does not works. It only shows me the search results from the few lines of code that is visible on the page.

 

Does DC provides any search text box which i am missing which i can use to search the text from my code?

  • September 14, 2012
  • Like
  • 1