• 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..!
 
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 :)