• CutMyCosts
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies

Hello,

 

I'm using the PHP API to create new accounts, right now they are being created as 'Business Accounts'. What can I set so they are created as Person Accounts?

 

I tried setting:

 

 

$records[0]->type = 'Person_Account';

 But that did not work.

 

Any Ideas?

 

Hello,

 

I have a custom object called "Notepad" associated with Accounts. There can be many notepads for one account (1:n). I am wonding, using php, what is the best way to select all the "Notepads" associated with a certain account based on the Account ID. 

 

Example:

 

I have the account Peter Test.

 

I create two Notepads associated with Peter Test.

 

The notepads contain a field labeled "internet_Provider".

 

From PHP I want to select the Peter Test's Account.FirstName Account.LastName and both Notepads.Internet_Provider, knowing only the Account ID.

 

I am able to select the FirstName and LastName no problem, but am unsure how to go about getting the custom objects and their contents.

 

Appreciate any help,

-Peter

 

 

Hello,

 

I am trying to create a custom page that allows people to enter information about Accounts. It was working fine until we added Person Accounts, now it fails with this error when you try to access the page:

 

 

There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Record Type ID: value not valid for the entity: Account". 

 

 

It still works fine when entering the information of a Business Account, but fails when attempting to do so for a Person Account.

 

I have narrowed it down to a picklist field causing the error. Whenever an inputField that is bound to a picklist is added the error occurs.

 

Snipped code:

 

 

<apex:page id="NeedsPage" standardController="Account">
  
    <apex:form >
    <apex:pageBlock title="Enter {!account.name}'s Needs">
    
    <apex:pageblockButtons >
        <apex:commandButton value="Save" action="{!save}"/>
    </apex:pageblockButtons>

    <!-- Bound to CheckBox - works fine -->
    <apex:inputField value="{!account.Cut_Home_Phone_Costs__c}"/>

    <!-- bound to textbox - works fine -->
    <apex:inputField value="{!account.Home_Phone_Type__c}" />

    <!-- Bound to picklist - fails on Person Account - works on Business account -->
    <apex:inputField value="{!account.Home_Phone_Provider_Other__c}" />
    </apex:pageBlock>
    </apex:form>
</apex:page>

 

Any suggestions?

 

Thanks,

Peter

 

Hello,

 

I'm using the PHP API to create new accounts, right now they are being created as 'Business Accounts'. What can I set so they are created as Person Accounts?

 

I tried setting:

 

 

$records[0]->type = 'Person_Account';

 But that did not work.

 

Any Ideas?