• Karl Urban
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Got Issue In Below Code.
if((
                   Schema.SObjectType.Custom_Setting__c.isCreateable() &&
                   Schema.SObjectType.Custom_Setting__c.fields.Name.isCreateable() &&
                   Schema.SObjectType.Custom_Setting__c.fields.UserName__c.isCreateable() &&
                   Schema.SObjectType.Custom_Setting__c.fields.Password__c.isCreateable() ) ||
                                      
                   (Schema.sObjectType.Custom_Setting__c.isUpdateable() &&
                   Schema.SObjectType.Custom_Setting__c.fields.Name.isUpdateable()  ) {
                   
                   
                    Custom_Setting__c cs = new Custom_Setting__c(UserName__c = username, Password__c = password, Name = usr.Name);
                    upsert cs Name;
                   
                   }