Click or drag to resize

IQuote Interface

For Quote 2.0 only.
Represents a quote
Example

Different ways to get Quote Custom fields

Python
customField1 = context.Quote.GetCustomField("Custom Field 1 name")

If you want to get only the Value, you can access it via indexer

Python
customFieldValue = context.Quote["Custom Field 1 name"]

Change Status of the Quote

Python
context.Quote.ChangeStatus("Preparing")

Different ways add items to the Quote

Python
quote = context.Quote
productId = 2
quantity = 5
systemId = 123
quote.AddItem(productId)
quote.AddItem(productId, quantity)
quote.AddItem(systemId)
quote.AddItem(systemId, quantity)

Creating new Quote revisions

Python
quote = context.Quote
newQuote = quote.CreateNewRevision(True)
newQuote.Comment = 'This is active revision'
newQuote.Save()
newQuote.Revision.SetDescription('Revision description set from scripting')

Submiting Quote for Approval

Python
quote = context.Quote
brokenApprovalRules = quote.GetApprovalConditions();
submitForApprovalRequests = [brokenApprovalRule.ToSubmitForApprovalRequest([responsibleApprover.Id for responsibleApprover in brokenApprovalRule.ResponsibleApprovers], 'Submited for approval from scripting') for brokenApprovalRule in brokenApprovalRules]
quote.SubmitForApproval(submitForApprovalRequests)

Approving Quote

Python
quote = context.Quote
requestsForApproval = quote.GetApproverRequests()
approvalResponse = [approvalRequest.ToApprovalResponse('Approved from scripting') for approvalRequest in requestsForApproval]
quote.Approve(approvalResponse)

Rejecting Quote

Python
quote = context.Quote
requestsForApproval = quote.GetApproverRequests()
approvalResponse = [approvalRequest.ToApprovalResponse('Rejected from scripting') for approvalRequest in requestsForApproval]
quote.Reject(approvalResponse)

Namespace: Scripting.Quote
Assembly: Scripting (in Scripting.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public interface IQuote

The IQuote type exposes the following members.

Properties
 NameDescription
Public propertyAssets Get all assets on the quote
Public propertyBillToCustomer Gets the bill to customer.
Public propertyCalculationStatus Gets the pricing document calculation status.
Public propertyComment Gets or sets the comment.
Public propertyCustomerProcedureName Gets the customer procedure name.
Public propertyDateClosed Gets the date closed.
Public propertyDateCreated Gets the date created.
Public propertyDateModified Gets the date modified.
Public propertyDateOrdered Gets the date ordered.
Public propertyDiscountExceeded Gets the value indicating that discount has been exceeded.
Public propertyDocumentProcedureName Gets the document procedure name.
Public propertyDocumentTypeCode Gets the quote document type code.
Public propertyEffectiveDate Gets the quote effective date.
Public propertyEndUserCustomer Gets the end user customer.
Public propertyExchangeRate Gets the exchange rate.
Public propertyExternalQuoteId Gets the quote external id.
Public propertyExternalQuoteOrigin Gets the quote external origin.
Public propertyId Gets a unique identifier for the current quote.
Public propertyIsBlocked Gets a value indicating whether quote is blocked.
Public propertyItem Gets or sets the Object with the specified custom field name.
Public propertyMappedOpportunityStatus Gets the mapped opportunity status.
Public propertyMarketFactor Gets the market factor.
Public propertyMarketId Gets or the market identifier.
Public propertyMessages Gets the messages.
Public propertyOpportunityId Gets the opportunity identifier.
Public propertyOpportunityName Gets the name of the opportunity.
Public propertyOrderId Gets the order identifier.
Public propertyOwnerId Gets the owner identifier.
Public propertyPricebookId Gets or sets the pricebook.
Public propertyPricingConditions Gets the pricing conditions.
Public propertyPricingDocumentId Gets the pricing document id
Public propertyPricingProcedureName Gets the pricing procedure name.
Public propertyProductTypes Gets the product types.
Public propertyQuoteNumber Gets the quote number.
Public propertyQuoteTables Gets the quote tables.
Public propertyRevision Gets the quote revision.
Public propertySelectedMarket Gets the selected market.
Public propertyShipToCustomer Gets the ship to customer.
Public propertyStatusId Gets the status.
Public propertyStatusName Gets the name of the status.
Public propertyTotals Gets the total.
Top
Methods
 NameDescription
Public methodAddInvolvedParty(String, Int32) Adds involved party to the quote.
Public methodAddInvolvedParty(String, String, String) Adds new business partner to the quote.
Public methodAddItem(Int32, Int32) Adds a Product to the Quote.
Public methodCode exampleAddItem(IProduct, Int32) Upserts a product to the quote. If a product instance was created via an edit operation through Edit, it will perform an update, If it was created via CreateProduct(Int32), it will add the item as a new one.
Public methodAddItem(String, Int32) Adds item to the quote. If add item cannot be executed, throws validation exception.
Public methodAddMessage Adds the scripting message.
Public methodApprove Approves the Quote
Public methodAssignBusinessPartner Reassign Business Partner
Public methodAssignTeamToSection Assign team to section.
Public methodAttachToQuote Attaches the specified opportunity to quote.
Public methodCalculate Calculates the specified field name.
Public methodChangePartnerFunction Change Partner Function
Public methodChangeStatus Changes the status.
Public methodCreateNewRevision(Boolean) Creates new active/inactive quote revision with default name and description.
Public methodCreateNewRevision(Boolean, String) Creates new active/inactive quote revision with provided name and default description.
Public methodCreateNewRevision(Boolean, String, String) Creates new active/inactive quote revision with provided name and description.
Public methodCreateSection Creates new section.
Public methodDeleteInvolvedParty Deletes the involved party.
Public methodDeleteItem Deletes the item with specified id.
Public methodDeleteMessage Deletes the message.
Public methodDeleteSection Delete section with given section path.
Public methodDistributeSection(String, String, String) Distributes section in anothter sections.
Public methodDistributeSection(String, String, String, NullableSingle) Distributes section in anothter sections.
Public methodGenerateDocument(String) Generates the quote document in PDF format.
Public methodGenerateDocument(String, GenDocFormat) Generates the quote document.
Public methodGenerateDocumentWithTranslations(String, NullableInt32) Generates the translated quote document in PDF format.
Public methodGenerateDocumentWithTranslations(String, GenDocFormat, NullableInt32) Generates the translated quote document.
Public methodGetAllItems Gets all quote items.
Public methodGetAncestorsSections Gets the ancestors sections.
Public methodGetApprovalConditions Returns list of broken approval rules.
Public methodGetApprovalHistory Returns approval history of the quote.
Public methodGetApproverRequests Returns list of approval requests.
Public methodGetAttachedDocument Gets the attached document by document id.
Public methodGetAttachedDocumentList Gets the attached document list.
Public methodGetChildrenSections Gets the children sections.
Public methodGetCustomField Gets the custom field.
Public methodGetDistributedSections Gets the distributed sections.
Public methodGetGeneratedDocumentList Gets the generated document list.
Public methodGetGeneratedDocumentList(String) Gets the generated document list by template name.
Public methodGetInvolvedParties Gets the involved parties.
Public methodGetItemAndHisAncestors Get the list of item ancestors including the item itself.
Public methodGetItemByItemId Get the item.
Public methodGetItemByItemNumber Gets the item.
Public methodGetItemsByProductTypeId Gets the items by product type identifier.
Public methodGetLatestGeneratedDocumentFileName Gets the name of the latest generated document file.
Public methodGetLatestGeneratedDocumentInBytes Gets the latest generated document in bytes.
Public methodGetLatestGeneratedDocumentStream Gets the latest generated document stream.
Public methodGetParentSection Gets the parent.
Public methodGetRootItems Gets all root items.
Public methodGetSection Gets the section by section path.
Public methodGetSectionAndHisAncestors Gets the section with his ancestors.
Public methodGetSectionItems Gets the section items.
Public methodGetSectionItemsWithoutDistribution Gets the section.
Public methodGetSections Gets the sections.
Public methodGetSectionWithAncestorsSections Gets the section with ancestors sections.
Public methodGetSectionWithChildrenSections Gets the section with children sections.
Public methodReject Rejects the quote
Public methodRemoveTeamFromSection Removes team from section.
Public methodRetractApprovalProcess Retract approval process
Public methodRetractDistribution Retracts distribution for given section path.
Public methodSetBillToCustomer Sets the bill to customer.
Public methodSetEndUserCustomer Sets the end user customer.
Public methodSetMarket(Int32) Sets the market.
Public methodSetMarket(String) Sets the market.
Public methodSetMarket(Int32, Int32) Sets the market.
Public methodSubmitForApproval Submits quote for approval
Top
See Also