Skip to content

MekanJuma/Create-Object-and-Fields-in-Apex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Create Custom Object and Fields in Apex

I utilized the Metadata API to create a custom object and fields. You need to deploy the MedatadataService.cls and MetadataServiceTest.cls classes to your Salesforce org.

Assignment:

Write an Apex class that creates a custom object called "Sales Order” and populates it with data from the Opportunity object.

Fields

  • Sales Order Number (Text, 10 characters)
  • Date (Date)
  • Account Name (Text, 50 characters)
  • Contact Name (Text, 50 characters)
  • Opportunity Name (Text, 100 characters)
  • Sales Order Amount (Currency)

The class should have a method that creates a sales order record for each Opportunity record

Criteria:

  • The Opportunity Stage is "Closed Won"
  • The Opportunity does not already have a sales order

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages