Quantcast
Channel: Discussion Forum > Connect Data Services
Viewing all articles
Browse latest Browse all 2504

Create Contact in Custom Process Model

$
0
0

Topic by Uma Guduru

Hi,

 

Im trying to create a contact from email header, im getting errors. below is the code. please check it and let me know what is it that im doing wrong,

 

try
   {
   // Need to create a contact   
   $contact = new RNCPHP\Contact();
   $contact->Emails = new RNCPHP\EmailArray();
   $contact->Emails[0] = new RNCPHP\Email();
   $contact->Emails[0]->AddressType=new RNCPHP\NamedIDOptList();
   $contact->Emails[0]->AddressType->LookupName = "Email - Primary";
   $contact->Emails[0]->Address = (string)$CCEmailAddress;    
   $contact->Login = (string)$CCEmailAddress;     
   $contact->Name = new RNCPHP\PersonName();
   $contact->Name->First = "Uma"; 
   $contact->Name->Last = "Uppala";
   $contact->save(RNCPHP\RNObject::SuppressAll);
   }
   catch (Exception $e)
   {
    echo "Exception caught: " . $e->getMessage()   . "\n";
   }


Viewing all articles
Browse latest Browse all 2504

Trending Articles