• george_dewalt
  • NEWBIE
  • 0 Points
  • Member since 2013

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

Hi,

 

I've created a new custom object, called obj_Single_Account,

and added it a trigger that's supposed to create a new Contact_Object,

called obj_Cntct, of standard type Contact , every time upon user's

creating of a new obj_Single_Account object:

 

trigger trg_Contact_Create on obj_Single_Account__c (after insert) {

    List<Contact> obj_ContactList = new List<Contact>();
    
    for (obj_Single_Account__c obj_SA : Trigger.New) {
                
                Contact obj_Cntct = new Contact ();
                obj_Cntct.Description = obj_SA.txt_Company_Name__c;
                obj_Cntct.Phone=obj_SA.txt_Phone_Number__c;
        
                obj_ContactList.add(obj_Cntct);
    }

    try {
        insert obj_ContactList;
    } catch (system.Dmlexception e) {
        system.debug (e);
    }
    

}

Now, I've also created some TEST_Class -- which, according to the

run_log seemed to have worked out correctly (i.e., w/o error),

but when I switched to USER_Mode interface (via my Internet browser)

and (as a USER) created a new obj_Single_Account, this new object

did NOT seem to have any CONTACT-type object attached.

 

Would anyone know why ?

 

Thanks

George

 

Hi,

 

I've come from VB.net world;

in there, when one is looking

to create a new app,

they'd ususally do the following:

 

1.) As the IDE opens, they'd select "Windows project"

      or something with GUI -- in which case, the IDE

      will display an empty FORM, upon which the developer

     could place various controls.

 

2.) Once the developer would like to test this new app,

      they'd compile (build) it and run it - and what's to run

      behind the scenes is the newly-compiled EXE file.

 

So my questions are:

 

From a developer's viewpoint

 

1.) How do I create a COMPLETE app,

     instead of just a class, for example,

     as demonstrated in the apex_workbook.pdf

     in Tutorial #4: Creating and Instantiating Classes,

     in Lesson 1: Creating an Apex Class Using the

     Developer Console?

 

2.) WHERE is my app going to reside?

 

3.) How do I run it?

 

 

In my browser

 

4.) Is there, in my SalesForce account (once logged in)

     differenct interfaces - one for a USER and one for a

      DEVELOPER? As they have different looks - and one

      of them has a "Build App" green button in it, while the

      other does not -- so ho do I switch from one to another?

 

Thanks in advance

George

 

 

Hi,


I just created a new developer account,
but haven't done anything with it just yet.

 

Having had a little bit of experience

in various Windows-based IDEs,

I was wondering how I could apply that

knowledge in here:

 

1.) Demo App


I was wondering how I were to find

some "Demo App" or a "Hello world"

simple example? And how do I run it,

or debug it, or view its variables?

 

 

 

2.) New App

 

When I log in there's a "Getting Started"

panel on top of the intro page, with an

"Add App" button - is it going to make some

sort of a "built-in app", or is it going to let ME write

some code - which I'd have no idea how to?

 

 

 

3.) Object Access

 

In a ".NET" / dotnet (Microsoft), it seems like

an APP's visual (GUI) objects are readily

available for the developer to refer to - but how

do I do that in here?

 

Thanks in advance

George

 

 

 


Hi,

I just created a new developer account,
but haven't done anything with it just yet.

I was wondering how I were to complete
the following tasks:

1.) Make a trigger to execute every time
      that an Account record is created,
      so that it will create a new Contact record,
      with some fields in it and some values for them?

      NOTE : This newly created Contact record
                    should be connected to the Account record.



2.) Make a second trigger -- perhaps for the
     same Account record?   I'm not sure...

     I heard there's supposed to be a
     field called "Parent Account", for
     Account records.

      Is it possible, then, to code a trigger
      that will execute upon a field's value change

      in a "Parent" record, where that trigger (or code)

      will update the equivalent field in ALL
      "child" accounts as well?

 

       For example, let's say the "Parent" record

       has a "phone number" field;

 

       How should I get the trigger - whenever

       a NEW phone number (value) is entered,

       to update the "phone number" field at

       ALL of the "child" accounts that specify the "main"

       Account as their "Parent Account"?

 

 

Thanks in advance
George



Hi,

 

I've created a new custom object, called obj_Single_Account,

and added it a trigger that's supposed to create a new Contact_Object,

called obj_Cntct, of standard type Contact , every time upon user's

creating of a new obj_Single_Account object:

 

trigger trg_Contact_Create on obj_Single_Account__c (after insert) {

    List<Contact> obj_ContactList = new List<Contact>();
    
    for (obj_Single_Account__c obj_SA : Trigger.New) {
                
                Contact obj_Cntct = new Contact ();
                obj_Cntct.Description = obj_SA.txt_Company_Name__c;
                obj_Cntct.Phone=obj_SA.txt_Phone_Number__c;
        
                obj_ContactList.add(obj_Cntct);
    }

    try {
        insert obj_ContactList;
    } catch (system.Dmlexception e) {
        system.debug (e);
    }
    

}

Now, I've also created some TEST_Class -- which, according to the

run_log seemed to have worked out correctly (i.e., w/o error),

but when I switched to USER_Mode interface (via my Internet browser)

and (as a USER) created a new obj_Single_Account, this new object

did NOT seem to have any CONTACT-type object attached.

 

Would anyone know why ?

 

Thanks

George

 

Hi,

 

I am trying to find how to locate the 15-digit Salesforce ID of a given custom object. I need this to dynamically create a record type selection link:

 

/setup/ui/recordtypeselect.jsp?ent= <Salesforce_ID_Of_Custom_Object>

 

For standard objects its fine to simply enter the object name in the 'ent' parameter, but for custom objects it requires the Salesforce ID (which is the one you find if you look at the URL when editing that particular object. I understand getKeyPrefix() within the DescribeResult gives you the first three digits but there does not seem to be a way of getting the entire 15-digit ID. 

 

Hope someone can help me out. 

Hi,

 

I've come from VB.net world;

in there, when one is looking

to create a new app,

they'd ususally do the following:

 

1.) As the IDE opens, they'd select "Windows project"

      or something with GUI -- in which case, the IDE

      will display an empty FORM, upon which the developer

     could place various controls.

 

2.) Once the developer would like to test this new app,

      they'd compile (build) it and run it - and what's to run

      behind the scenes is the newly-compiled EXE file.

 

So my questions are:

 

From a developer's viewpoint

 

1.) How do I create a COMPLETE app,

     instead of just a class, for example,

     as demonstrated in the apex_workbook.pdf

     in Tutorial #4: Creating and Instantiating Classes,

     in Lesson 1: Creating an Apex Class Using the

     Developer Console?

 

2.) WHERE is my app going to reside?

 

3.) How do I run it?

 

 

In my browser

 

4.) Is there, in my SalesForce account (once logged in)

     differenct interfaces - one for a USER and one for a

      DEVELOPER? As they have different looks - and one

      of them has a "Build App" green button in it, while the

      other does not -- so ho do I switch from one to another?

 

Thanks in advance

George

 

 

Hi,


I just created a new developer account,
but haven't done anything with it just yet.

 

Having had a little bit of experience

in various Windows-based IDEs,

I was wondering how I could apply that

knowledge in here:

 

1.) Demo App


I was wondering how I were to find

some "Demo App" or a "Hello world"

simple example? And how do I run it,

or debug it, or view its variables?

 

 

 

2.) New App

 

When I log in there's a "Getting Started"

panel on top of the intro page, with an

"Add App" button - is it going to make some

sort of a "built-in app", or is it going to let ME write

some code - which I'd have no idea how to?

 

 

 

3.) Object Access

 

In a ".NET" / dotnet (Microsoft), it seems like

an APP's visual (GUI) objects are readily

available for the developer to refer to - but how

do I do that in here?

 

Thanks in advance

George

 

 

 


Hi,

I just created a new developer account,
but haven't done anything with it just yet.

I was wondering how I were to complete
the following tasks:

1.) Make a trigger to execute every time
      that an Account record is created,
      so that it will create a new Contact record,
      with some fields in it and some values for them?

      NOTE : This newly created Contact record
                    should be connected to the Account record.



2.) Make a second trigger -- perhaps for the
     same Account record?   I'm not sure...

     I heard there's supposed to be a
     field called "Parent Account", for
     Account records.

      Is it possible, then, to code a trigger
      that will execute upon a field's value change

      in a "Parent" record, where that trigger (or code)

      will update the equivalent field in ALL
      "child" accounts as well?

 

       For example, let's say the "Parent" record

       has a "phone number" field;

 

       How should I get the trigger - whenever

       a NEW phone number (value) is entered,

       to update the "phone number" field at

       ALL of the "child" accounts that specify the "main"

       Account as their "Parent Account"?

 

 

Thanks in advance
George