Class Opportunity

java.lang.Object
com.imc.iss.groovy.opportunity.Opportunity

public class Opportunity extends Object
This is a class representing an opportunity for use by groovy scripts

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

  • Constructor Details

    • Opportunity

      public Opportunity()
  • Method Details

    • addPartnerFunctions

      public Opportunity addPartnerFunctions(Collection<PartnerFunctionRecord> partnerFunctionRecords)
      Add partner function records into opportunity's Partner Function.
      Parameters:
      partnerFunctionRecords - . The partner function records to add into a opportunity.
      Returns:
      The Opportunity instance.
    • addSalesInfo

      public Opportunity addSalesInfo(Collection<SalesInfo> opportunitySalesInfo)
    • deletePartnerFunctions

      public Opportunity deletePartnerFunctions(Collection<BusinessObject> partnerFunctionRecords)
      remove partner function records into opportunity's Partner Function.
      Parameters:
      partnerFunctionRecords - . The partner function records to remove into a opportunity.
      Returns:
      The opportunity instance.
    • deleteSalesInfo

      public void deleteSalesInfo(Collection<SalesInfo> salesInfos)
      Remove salesInfo records into opportunity's salesInfo Function.
      Parameters:
      salesInfo - . The sales info records to remove from opportunity.
    • getOpportunityDataAttributeValue

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

      public String getOpportunityRelationAttributeURI(String attributeURI) throws IMCException
      Throws:
      IMCException
    • getOpportunityURI

      public String getOpportunityURI()
    • getPartnerFunction

      public Collection<BusinessObject> getPartnerFunction() throws IMCException
      Throws:
      IMCException
    • setOpportunityDataAttribute

      public Opportunity setOpportunityDataAttribute(String attributeURI, Object value) throws IMCException
      To set a value for the opportunity data attribute.
      Parameters:
      attributeURI - as String. The URI of the opportunity data attribute.
      value - as Object. The value for the opportunity data attribute.
      Returns:
      The Opportunity
      Throws:
      IMCException - the platform exception
    • setOpportunityRelationAttribute

      public Opportunity setOpportunityRelationAttribute(String attributeURI, String valueURI) throws IMCException
      To set a value for the opportunity relation attribute.
      Parameters:
      attributeURI - as String. The URI of the opportunity relation attribute.
      valueURI - as Object. The value for the opportunity relation attribute.
      Returns:
      The Opportunity
      Throws:
      IMCException - the platform exception
    • toString

      public String toString()
      Returns a string representation of the opportunity
      Overrides:
      toString in class Object
      Returns:
      A string representation of the opportunity.