Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a contact #242

Open
JGalbois opened this issue Jan 13, 2023 · 0 comments
Open

Create a contact #242

JGalbois opened this issue Jan 13, 2023 · 0 comments

Comments

@JGalbois
Copy link

JGalbois commented Jan 13, 2023

I try to create a new contact.
But i don't find the full list of fields available and the syntax for submit the creation

I see the example :

$response = $api->createContacts(array(
 
	'CompanyName' => 'orgnom',
	'GivenName' => 'NEW',
    'Surname' => 'NEW',
    'EmailAddresses' => array(
        'Entry' => array('Key' => Enumeration\EmailAddressKeyType::EMAIL_ADDRESS_1, '_value' => 'john.smith@gmail.com')
    ),
    //Creating multiple entries
    'PhoneNumbers' => array(
        'Entry' => array(
            array('Key' => Enumeration\PhoneNumberKeyType::HOME_PHONE, '_value' => '000'),
            array('Key' => Enumeration\PhoneNumberKeyType::BUSINESS_PHONE, '_value' => '111'),
        )
    ),
    'PhysicalAddresses' => array(
        'Entry' => array(
            'Key' => Enumeration\PhysicalAddressKeyType::HOME,
            'street' => '123 Street',
            'city' => '123 City',
            'state' => '123 State',
            'countryOrRegion' => '123 Country',
            'postalCode' => '12345',
        )
    ),
));

I would like to add

	'CompleteName' => array(
		'Entry' => array(
				array('Key' => 'FirstName', '_value' => '111'),
			),
	),

It's not the right syntax
"Fatal error: Uncaught garethp\ews\API\Exception\ExchangeException: Set action is invalid for property."

I need some help
Thank's

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant