Scripting. |
| Interface | Description | |
|---|---|---|
| IAfterQuoteTableExcelUploaded | For Quote 2.0 only. When Excel is uploaded into a Quote Table - Represents on quote table excel uploaded event | |
| IAsset | Represent a Asset | |
| IAssetCollection | ||
| IMarketBase | For Quote 2.0 only. Represents Quote market Getting value of Selected Market Name. All the properties are read-only.Python selectedMarket = context.Quote.SelectedMarket Trace.Write(selectedMarket.Name) | |
| IQuote | For Quote 2.0 only. Represents a quote Different ways to get Quote Custom fieldsPython customField1 = context.Quote.GetCustomField("Custom Field 1 name")If you want to get only the Value, you can access it via indexerPython customFieldValue = context.Quote["Custom Field 1 name"]Change Status of the QuotePython context.Quote.ChangeStatus("Preparing")Different ways add items to the QuotePython quote = context.Quote productId = 2 quantity = 5 systemId = 123 quote.AddItem(productId) quote.AddItem(productId, quantity) quote.AddItem(systemId) quote.AddItem(systemId, quantity) | |
| IQuote2SectionItemCollection | For Quote 2.0 only. | |
| IQuoteAffectedItemCollection | For Quote 2.0 only. Represents the collection of items that are changed Example of custom calculation for product type level totalsPython Trace.Write("Executing ProductType_CustomExtendedAmount custom calculation") productTypes = context.Quote.ProductTypes for item in context.AffectedItems: Trace.Write("Item id:{} ProductTypeId: {} Delta = {}".format(item.Id, item.ProductTypeId, item.GetDelta("CustomExtendedAmount"))) productType = next((x for x in productTypes if x.ProductTypeId == item.ProductTypeId), None) if productType is not None: Trace.Write("Found matching product type") if productType["CustomExtendedAmount"] is None: Trace.Write("CustomExtendedAmount has NULL value") productType["CustomExtendedAmount"] = 0 productType["CustomExtendedAmount"] += item.GetDelta("CustomExtendedAmount") Changing Quote Status to specified Quote StatusPython context.Quote.ChangeStatus("Preparing") | |
| IQuoteAffectedProductTypesCollection | For Quote 2.0 only. | |
| IQuoteAffectedSection | For Quote 2.0 only. Affected quote sections | |
| IQuoteAffectedSectionsCollection | For Quote 2.0 only. | |
| IQuoteAttachedDocument | For Quote 2.0 only. Attached document | |
| IQuoteContext | For Quote 2.0 only. | |
| IQuoteContractDurationBase | Contract duration interface. | |
| IQuoteContractExtension | The quote contract extension model. | |
| IQuoteCustomer | For Quote 2.0 only. Quote customer | |
| IQuoteCustomField | For Quote 2.0 only. Represents a quote custom field Print the Quote Custom field propertiesPython def TraceCustomField(customField): Trace.Write("------------------------------------------------") Trace.Write("AccessLevel: {}".format(customField.AccessLevel)) Trace.Write("AttributeValue: {}".format(customField.AttributeValue)) Trace.Write("AttributeValueCode: {}".format(customField.AttributeValueCode)) Trace.Write("AttributeValueTranslated: {}".format(customField.AttributeValueTranslated)) Trace.Write("CustomFieldType: {}".format(customField.CustomFieldType)) Trace.Write("Label: {}".format(customField.Label)) Trace.Write("Value: {}".format(customField.Value)) customField = context.Quote.GetCustomField("CustomFieldName") TraceCustomField(customField) | |
| IQuoteGeneratedDocument | For Quote 2.0 only. Generated document | |
| IQuoteHelper |
Allows global manipulations of the Quotes.
Create a new QuotePython quote = quoteHelper.CreateNewQuote() Reassign Quote to specified userReturn parameter is of type IQuoteInfo,containing new quote id, new user id and new quote number. Python quoteInfo = QuoteHelper.Reassign("00021520", "jsmith") Delete QuotePython quoteInfo = QuoteHelper.Delete(quoteNumber) Gets the QuotePython quote = QuoteHelper.Get(quoteNumber)
quote.Comment = 'Some Quote Comment'
quote.Save() | |
| IQuoteInfo | Result from executing an action on the Quote | |
| IQuoteInvolvedParty | For Quote 2.0 only. | |
| IQuoteItem | For Quote 2.0 only. Represent abstract class which expose common interface for main and line items Different ways to access Quote Item Custom FieldsPython quoteItem = context.Quote.GetItemByItemNumber(1) cfValue = quoteItem.GetCustomField("CF name").Value Another way to acces Quote Item Custom Field Value property is via indexerPython cfValue = quoteItem["CF name"] | |
| IQuoteItemAttribute | For Quote 2.0 only. Quote Item Attribute | |
| IQuoteItemAttributeCollection | For Quote 2.0 only. Collection of all attributes selected in product referenced in Quote Item | |
| IQuoteItemAttributeValue | For Quote 2.0 only. Represents selected value of the attribute of referenced product in Quote Item | |
| IQuoteItemCollection | For Quote 2.0 only. Represents collection of quote items | |
| IQuoteItemCustomField | For Quote 2.0 only. Represents a quote item custom field | |
| IQuoteMainItem | For Quote 2.0 only. Represent abstract class which expose common interface for main items. | |
| IQuoteMessage | ||
| IQuoteProductType | For Quote 2.0 only. Represents a quote product type | |
| IQuoteSectionItem | For Quote 2.0 only. Quote section item | |
| IQuoteShipToCustomer | For Quote 2.0 only. Quote ship to customer | |
| IQuoteTable | Represents custom quote table | |
| IQuoteTableCollection | Represents collection of quote tables | |
| IQuoteTotal | For Quote 2.0 only. Represents a quote total | |
| ISavableQuote | Represents a IQuote that can be saved manually. | |
| ISectionTotalsCollection | For Quote 2.0 only. Section Totals Collection |
| Enumeration | Description | |
|---|---|---|
| AccessLevel | Represents options of access level | |
| MessageLevel | The message level |