0
public SObject SobjectNewRecord{get; set;}

public void newRecord(){
            Map<String, Schema.SObjectType> gd = Schema.getGlobalDescribe();
            Schema.SobjectType oType = gd.get(relatedObject);
            SobjectNewRecord = oType.newSObject();
   }

   public void saveNewRecord(){
        insert SobjectNewRecord;

    }

page

<apex:repeat value="{!SobjectEditRecord}" var="sobj">
     <apex:inputField styleClass="slds-input" value="{!sobj[headerApiName]}"/>
</apex:repeat>  
2
  • check the current user's profile having create permission or not
    – Ratan Paul
    Jul 14, 2016 at 9:37
  • user is system addministrator Jul 14, 2016 at 10:25

0

You must log in to answer this question.

Browse other questions tagged .