Class Contact

java.lang.Object
com.imc.iss.groovy.contact.Contact

public class Contact extends Object
This is a class representing a Contact for use by groovy scripts

Inside the script, an instance of this class, containing the data of the contact that the script will be run on, will be provided automatically and can be accessed as a variable named contact

  • Constructor Details

    • Contact

      public Contact()
  • Method Details

    • addSalesInfo

      public Contact addSalesInfo(Collection<SalesInfo> salesInfos)
      Add salesInfo records into contact's salesInfo Function.
      Parameters:
      salesInfo - . The sales info to add into a contact.
      Returns:
      The Contact instance.
    • deleteSalesInfo

      public Contact deleteSalesInfo(Collection<BusinessObject> salesInfos)
      Remove salesInfo records into contact's salesInfo Function.
      Parameters:
      salesInfo - . The sales info records to remove from contact.
      Returns:
      The contact instance.
    • getContactDataAttributeValue

      public Object getContactDataAttributeValue(String attributeURI) throws IMCException
      To get the value of a contact data attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the contact data attribute.
      Returns:
      the value of the contact data attribute as Object.
      Throws:
      IMCException
    • getContactRelationAttributeErpId

      public String getContactRelationAttributeErpId(String attributeURI) throws IMCException
      To get the ERPID of a contact relation attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the quote relation attribute.
      Returns:
      the ERPId of the contact relation attribute as String.
      Throws:
      IMCException
    • getContactRelationAttributeObjectId

      public String getContactRelationAttributeObjectId(String attributeURI) throws IMCException
      To get the object Id of a contact relation attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the contact relation attribute.
      Returns:
      the objectId of the contact relation attribute as String.
      Throws:
      IMCException
    • getContactRelationAttributeObjectName

      public String getContactRelationAttributeObjectName(String attributeURI) throws IMCException
      To get the object name of a contact relation attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the contact relation attribute.
      Returns:
      the object name of the contact relation attribute as String.
      Throws:
      IMCException
    • getContactRelationAttributeURI

      public String getContactRelationAttributeURI(String attributeURI) throws IMCException
      To get the URI of a contact relation attribute by attribute URI.
      Parameters:
      attributeURI - as String. The URI of the contact relation attribute.
      Returns:
      the object URI of the contact relation attribute as String.
      Throws:
      IMCException
    • getContactURI

      public String getContactURI()
      Retrieves the URI of this Contact
      Returns:
      The Contact URI as String
    • getSalesInfo

      public Collection<BusinessObject> getSalesInfo() throws IMCException
      Retrieves the salesInfo of the contact.
      Returns:
      Collection <BusinessObject>.
      Throws:
      IMCException
    • setContactDataAttribute

      public Contact setContactDataAttribute(String attributeURI, Object value) throws IMCException
      To set a value for the contact data attribute.
      Parameters:
      attributeURI - as String. The URI of the contact data attribute.
      value - as Object. The value for the contact data attribute.
      Returns:
      The Contact instance.
      Throws:
      IMCException - the platform exception
    • setContactRelationAttribute

      public Contact setContactRelationAttribute(String attributeURI, String valueURI) throws IMCException
      To set a value for the contact relation attribute.
      Parameters:
      attributeURI - as String. The URI of the contact relation attribute.
      valueURI - as Object. The value for the contact relation attribute.
      Returns:
      The Contact instance.
      Throws:
      IMCException - the platform exception