MObject.apex

  • Docs
  • Tutorials
Docs Menu
  • MObject
  • MObject.Funcs
    • Funcs
  • MObject Instance
    • Creation Methods
    • Methods

Creation Methods Guide

Creation methods of MObjects

create

Static methods to create MObject instances.

MObject mo = MObject.create(Pricebook2.sObjectType, new Map());

Methods are as below:

NameDescription
create(Schema.SObjectType, Object)Create an MObject from SObject type and source
create(Schema.SObjectType)Create a default MObject from SObject type
create(String, Object)Create an MObject from type name and source
create(String)Create a default MObject from type name
create(Object)Create an MObject from source

createList

Static methods to create a list of MObject instances.

List mos = MObject.createList(Pricebook2.sObjectType, new List>());

Methods are as below:

NameDescription
createList(Schema.SObjectType, List)Create MObjects from SObject type and list of objects
createList(String, List)Create MObjects from type name and list of objects
createList(List)Create MObjects from list of objects

Contribute on Github! Edit this section.