• Dheeraj-(DJ)
  • NEWBIE
  • 14 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 6
    Replies

Hello Team!

I am SF begineer and trying the below code, after creating Opportunity in SF, trigger automatically creates a contact but contact is not linking to Opportunity and not showing up as in related list.


trigger Op_Trigger3 on Opportunity (After Insert) {
Contact c = new Contact();
for(Opportunity o : Trigger.New)
{
c.AccountID = o.AccountID;
c.FirstName = 'Michael';
c.LastName = 'Scofield';
insert c;
}
}

I am not sure if something is missing in the trigger code or not. Please correct if I am making any mistake.

Thanks in Advance,
​Dheeraj
Hi Team,
I am trying to import data using data loader but getting error. I have created a custom object "Test" which has a look up field "Merchandise"
I have added Merchandise ID in the column as well. Please correct me where I am doing wrong.

Thanks in Advance!
Dheeraj

Test ObjectData Loader Error 
<apex:page standardController="Lead">
<apex:form >
<apex:pageBlock title="New Lead">
   <apex:pageBlockSection columns="2">
     <apex:inputtext value="{!Lead.Name}" label="Name"/>
     <apex:inputfield value="{!Lead.Email}" label="Email"/>
     <apex:inputfield value="{!Lead.Status}" label="Status"/>
     <apex:inputfield value="{!Lead.MobilePhone}" label="Mobile Phone"/>
     <apex:inputfield value="{!Lead.Company}" label="Company Name"/>
     <apex:inputfield value="{!Lead.AnnualRevenue}" label="Annual Revenue"/>
     <apex:inputfield value="{!Lead.Fax}" label="Fax"/>
     <apex:inputfield value="{!Lead.Title}" label="Title"/>
     <apex:inputfield value="{!Lead.Website}" label="Website"/>
   </apex:pageBlockSection>
   
   <apex:pageBlockButtons >
      <apex:commandButton action="{!Save}" value="Save"/>
      <apex:commandButton action="{!Cancel}" value="Cancel"/>
      <apex:commandButton action="{!Edit}" value="Edit"/>
      <apex:commandButton action="{!View}" value="View"/>
      <apex:commandButton action="{!Delete}" value="Delete"/>
   </apex:pageBlockButtons>
   
</apex:pageBlock>
<apex:detail relatedList="true"/>
 </apex:form>
</apex:page>
I was trying to create a knowledge article and publish it but getting the below error
User-added image
Please help.

Thanks
- Kavya
Hi Team,
I am trying to import data using data loader but getting error. I have created a custom object "Test" which has a look up field "Merchandise"
I have added Merchandise ID in the column as well. Please correct me where I am doing wrong.

Thanks in Advance!
Dheeraj

Test ObjectData Loader Error 
<apex:page standardController="Lead">
<apex:form >
<apex:pageBlock title="New Lead">
   <apex:pageBlockSection columns="2">
     <apex:inputtext value="{!Lead.Name}" label="Name"/>
     <apex:inputfield value="{!Lead.Email}" label="Email"/>
     <apex:inputfield value="{!Lead.Status}" label="Status"/>
     <apex:inputfield value="{!Lead.MobilePhone}" label="Mobile Phone"/>
     <apex:inputfield value="{!Lead.Company}" label="Company Name"/>
     <apex:inputfield value="{!Lead.AnnualRevenue}" label="Annual Revenue"/>
     <apex:inputfield value="{!Lead.Fax}" label="Fax"/>
     <apex:inputfield value="{!Lead.Title}" label="Title"/>
     <apex:inputfield value="{!Lead.Website}" label="Website"/>
   </apex:pageBlockSection>
   
   <apex:pageBlockButtons >
      <apex:commandButton action="{!Save}" value="Save"/>
      <apex:commandButton action="{!Cancel}" value="Cancel"/>
      <apex:commandButton action="{!Edit}" value="Edit"/>
      <apex:commandButton action="{!View}" value="View"/>
      <apex:commandButton action="{!Delete}" value="Delete"/>
   </apex:pageBlockButtons>
   
</apex:pageBlock>
<apex:detail relatedList="true"/>
 </apex:form>
</apex:page>