Class NSQuoteAgent
Services for the Quote Management feature, part of the Sale module.
Syntax
Examples
NSQuoteAgent agent;
agent.callMethod(arg1, arg2);
Constructors
NSQuoteAgent()
Services for the Quote Management feature, part of the Sale module.
Introduced or updated in version: 7.5
Declaration
NSQuoteAgent
Examples
NSQuoteAgent agent;
agent.callMethod(arg1, arg2);
Methods
AddSaleTypeQuoteAttachment(Integer,Integer)
Adds a new quote attachment document to a sale type
Introduced or updated in version: 7.5
Declaration
Integer AddSaleTypeQuoteAttachment(Integer saleTypeId, Integer documentId)
Parameters
Type | Name | Description |
---|---|---|
Integer | saleTypeId | |
Integer | documentId |
Returns
Type | Description |
---|---|
Integer |
Examples
NSQuoteAgent agent;
Integer saleTypeId;
Integer documentId;
Integer res = agent.AddSaleTypeQuoteAttachment(saleTypeId, documentId);
ApproveQuoteVersion(Integer,String,Integer,String)
Approves a quote version
Introduced or updated in version: 7.5
Declaration
NSApproveRejectResponse ApproveQuoteVersion(Integer quoteVersionId, String approvedByText, Integer approvedByAssociateId, String approvalText)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId | |
String | approvedByText | |
Integer | approvedByAssociateId | |
String | approvalText |
Returns
Type | Description |
---|---|
NSApproveRejectResponse |
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
String approvedByText;
Integer approvedByAssociateId;
String approvalText;
NSApproveRejectResponse res = agent.ApproveQuoteVersion(quoteVersionId, approvedByText, approvedByAssociateId, approvalText);
CanConnectorProvideCapability(Integer,String)
Introduced or updated in version: 7.5
Declaration
Bool CanConnectorProvideCapability(Integer quoteConnectionId, String capabilityName)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteConnectionId | |
String | capabilityName |
Returns
Type | Description |
---|---|
Bool | Can the connector provide the capability. |
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
String capabilityName;
Bool res = agent.CanConnectorProvideCapability(quoteConnectionId, capabilityName);
CopyQuoteAlternative(Integer,Integer,String)
Copies a quote alternative from the same sale and adds it to a version.
Introduced or updated in version: 7.5
Declaration
NSQuoteAlternative CopyQuoteAlternative(Integer quoteVersionId, Integer quoteAlternativeId, String quoteAlternativeName)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId | |
Integer | quoteAlternativeId | |
String | quoteAlternativeName |
Returns
Type | Description |
---|---|
NSQuoteAlternative |
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
Integer quoteAlternativeId;
String quoteAlternativeName;
NSQuoteAlternative res = agent.CopyQuoteAlternative(quoteVersionId, quoteAlternativeId, quoteAlternativeName);
CopySuperOfficePriceList(Integer,String,DateTime,DateTime,Integer,Bool)
Creates a copy of a PriceList in the SuperOffice database
Introduced or updated in version: 7.5
Declaration
NSPriceList CopySuperOfficePriceList(Integer originalPriceListId, String newName, DateTime validFrom, DateTime validTo, Integer newCurrencyId, Bool convertCurrency)
Parameters
Type | Name | Description |
---|---|---|
Integer | originalPriceListId | |
String | newName | |
validFrom | ||
validTo | ||
Integer | newCurrencyId | |
Bool | convertCurrency |
Returns
Type | Description |
---|---|
NSPriceList |
Examples
NSQuoteAgent agent;
Integer originalPriceListId;
String newName;
DateTime validFrom;
DateTime validTo;
Integer newCurrencyId;
Bool convertCurrency;
NSPriceList res = agent.CopySuperOfficePriceList(originalPriceListId, newName, validFrom, validTo, newCurrencyId, convertCurrency);
CreateAndSaveQuote(Integer,Integer,String)
Creates a new quote on a sale.
Introduced or updated in version: 7.5
Declaration
NSQuoteEntity CreateAndSaveQuote(Integer saleId, Integer connectionId, String firstAlternativeName)
Parameters
Type | Name | Description |
---|---|---|
Integer | saleId | |
Integer | connectionId | |
String | firstAlternativeName |
Returns
Type | Description |
---|---|
NSQuoteEntity |
Examples
NSQuoteAgent agent;
Integer saleId;
Integer connectionId;
String firstAlternativeName;
NSQuoteEntity res = agent.CreateAndSaveQuote(saleId, connectionId, firstAlternativeName);
CreateAndSaveQuoteFromSale(Integer,Integer)
Creates a copy the active version with connected alternatives and quotelines from another sale.
Introduced or updated in version: 7.5
Declaration
NSQuoteEntity CreateAndSaveQuoteFromSale(Integer copyFromSaleId, Integer copyToSaleId)
Parameters
Type | Name | Description |
---|---|---|
Integer | copyFromSaleId | |
Integer | copyToSaleId |
Returns
Type | Description |
---|---|
NSQuoteEntity |
Examples
NSQuoteAgent agent;
Integer copyFromSaleId;
Integer copyToSaleId;
NSQuoteEntity res = agent.CreateAndSaveQuoteFromSale(copyFromSaleId, copyToSaleId);
CreateAndSaveQuoteVersion(Integer)
Created a new NSQuoteVersion based on another NSQuoteVersion on the same Quote.
Introduced or updated in version: 7.5
Declaration
NSQuoteVersion CreateAndSaveQuoteVersion(Integer quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId |
Returns
Type | Description |
---|---|
NSQuoteVersion |
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSQuoteVersion res = agent.CreateAndSaveQuoteVersion(quoteVersionId);
CreateConnectionFromConnectorName(String)
Creates a new connection.
Introduced or updated in version: 7.5
Declaration
NSQuoteConnection CreateConnectionFromConnectorName(String connectorName)
Parameters
Type | Name | Description |
---|---|---|
String | connectorName |
Returns
Type | Description |
---|---|
NSQuoteConnection |
Examples
NSQuoteAgent agent;
String connectorName;
NSQuoteConnection res = agent.CreateConnectionFromConnectorName(connectorName);
CreateDefaultPriceList()
Sets default values into a new NSPriceList.
Introduced or updated in version: 8.2
Declaration
NSPriceList CreateDefaultPriceList()
Returns
Type | Description |
---|---|
NSPriceList |
Remarks
NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance
Examples
NSQuoteAgent agent;
NSPriceList thing = agent.CreateDefaultPriceList();
thing = agent.SavePriceList(thing);
CreateDefaultProduct()
Sets default values into a new NSProduct.
Introduced or updated in version: 8.2
Declaration
NSProduct CreateDefaultProduct()
Returns
Type | Description |
---|---|
NSProduct |
Remarks
NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance
Examples
NSQuoteAgent agent;
NSProduct thing = agent.CreateDefaultProduct();
thing = agent.SaveProduct(thing);
CreateDefaultQuoteAlternative()
Sets default values into a new NSQuoteAlternative.
Introduced or updated in version: 7.5
Declaration
NSQuoteAlternative CreateDefaultQuoteAlternative()
Returns
Type | Description |
---|---|
NSQuoteAlternative |
Remarks
NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance
Examples
NSQuoteAgent agent;
NSQuoteAlternative thing = agent.CreateDefaultQuoteAlternative();
thing = agent.SaveQuoteAlternative(thing);
CreateOrUpdateQuoteVersionAttachments(Integer)
Looks at the Quote version, related sale and sale type, and ensures that the correct NSQuoteVersionAttachment records exist. This method may create or delete records
Introduced or updated in version: 7.5
Declaration
NSQuoteVersionAttachment[] CreateOrUpdateQuoteVersionAttachments(Integer quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId |
Returns
Type | Description |
---|---|
NSQuoteVersionAttachment[] |
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSQuoteVersionAttachment[] res = agent.CreateOrUpdateQuoteVersionAttachments(quoteVersionId);
CreateQuoteAlternative(Integer,String,String)
Creates a new quote alternative on a version.
Introduced or updated in version: 7.5
Declaration
NSQuoteAlternative CreateQuoteAlternative(Integer quoteVersionId, String quoteAlternativeName, String quoteAlternativeDescription)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId | |
String | quoteAlternativeName | |
String | quoteAlternativeDescription |
Returns
Type | Description |
---|---|
NSQuoteAlternative |
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
String quoteAlternativeName;
String quoteAlternativeDescription;
NSQuoteAlternative res = agent.CreateQuoteAlternative(quoteVersionId, quoteAlternativeName, quoteAlternativeDescription);
CreateQuoteLine(Integer,String)
Creates a quoteline based on a product key.
Introduced or updated in version: 7.5
Declaration
NSQuoteLine CreateQuoteLine(Integer quoteAlternativeId, String eRPProductKey)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteAlternativeId | |
String | eRPProductKey |
Returns
Type | Description |
---|---|
NSQuoteLine |
Examples
NSQuoteAgent agent;
Integer quoteAlternativeId;
String eRPProductKey;
NSQuoteLine res = agent.CreateQuoteLine(quoteAlternativeId, eRPProductKey);
CreateQuoteLineFromProduct(Integer,NSProduct)
Creates a quoteline based on a product.
Introduced or updated in version: 7.5
Declaration
NSQuoteLine CreateQuoteLineFromProduct(Integer quoteAlternativeId, NSProduct product)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteAlternativeId | |
NSProduct | product |
Returns
Type | Description |
---|---|
NSQuoteLine |
Examples
NSQuoteAgent agent;
Integer quoteAlternativeId;
NSProduct product;
NSQuoteLine res = agent.CreateQuoteLineFromProduct(quoteAlternativeId, product);
DeleteConnection(Integer)
Marks a connection as deleted.
Introduced or updated in version: 7.5
Declaration
Void DeleteConnection(Integer quoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteConnectionId |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
agent.DeleteConnection(quoteConnectionId);
DeletePriceList(Integer)
Deletes the NSPriceList
Introduced or updated in version: 7.5
Declaration
Void DeletePriceList(Integer priceList)
Parameters
Type | Name | Description |
---|---|---|
Integer | priceList |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAgent agent;
agent.DeletePriceList(123);
DeleteProduct(Integer)
Deletes the NSProduct
Introduced or updated in version: 8.2
Declaration
Void DeleteProduct(Integer product)
Parameters
Type | Name | Description |
---|---|---|
Integer | product |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAgent agent;
agent.DeleteProduct(123);
DeleteQuote(Integer)
Deletes a Quote
Introduced or updated in version: 7.5
Declaration
Void DeleteQuote(Integer quoteId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteId |
Returns
Type | Description |
---|---|
Void |
DeleteQuoteAlternative(Integer)
Deletes a quote alternative
Introduced or updated in version: 7.5
Declaration
Void DeleteQuoteAlternative(Integer quoteAlternativeId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteAlternativeId |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAgent agent;
Integer quoteAlternativeId;
agent.DeleteQuoteAlternative(quoteAlternativeId);
DeleteQuoteLine(Integer)
Deletes the QuoteLine in the SuperOffice database
Introduced or updated in version: 7.5
Declaration
Void DeleteQuoteLine(Integer quoteLineId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteLineId |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAgent agent;
Integer quoteLineId;
agent.DeleteQuoteLine(quoteLineId);
DeleteQuoteLines(Integer[])
Deletes the QuoteLines in the SuperOffice database
Introduced or updated in version: 7.5
Declaration
Void DeleteQuoteLines(Integer[] quoteLineIds)
Parameters
Type | Name | Description |
---|---|---|
Integer[] | quoteLineIds |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAgent agent;
Integer[] quoteLineIds;
agent.DeleteQuoteLines(quoteLineIds);
DeleteSaleTypeQuoteAttachment(Integer)
Deletes the sale type quote attachment with the given ID
Introduced or updated in version: 7.5
Declaration
Void DeleteSaleTypeQuoteAttachment(Integer saleTypeQuoteAttachmentId)
Parameters
Type | Name | Description |
---|---|---|
Integer | saleTypeQuoteAttachmentId |
Returns
Type | Description |
---|---|
Void |
FindProduct(Integer,String,String)
Gets a product, from the ProductProvider
Introduced or updated in version: 7.5
Declaration
NSProduct[] FindProduct(Integer quoteAlternativeId, String userInput, String priceListKey)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteAlternativeId | |
String | userInput | |
String | priceListKey |
Returns
Type | Description |
---|---|
NSProduct[] |
Examples
NSQuoteAgent agent;
Integer quoteAlternativeId;
String userInput;
String priceListKey;
NSProduct[] res = agent.FindProduct(quoteAlternativeId, userInput, priceListKey);
GenerateQuoteDocuments(Integer,Integer,Bool,Integer,Bool,String)
Generate all the documents required to send the Quote as an email to the prospect, or an Order Confirmation; it just depends on the template IDs for the lines doc and mail body.
Introduced or updated in version: 7.5
Declaration
NSQuotePublishDocuments GenerateQuoteDocuments(Integer quoteVersionId, Integer emailBodyTemplateId, Bool attachMainDocument, Integer quotedProductsTemplateId, Bool includeAttachments, String rawMailSubject)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId | |
Integer | emailBodyTemplateId | |
Bool | attachMainDocument | |
Integer | quotedProductsTemplateId | |
Bool | includeAttachments | |
String | rawMailSubject |
Returns
Type | Description |
---|---|
NSQuotePublishDocuments |
Remarks
Quote version status is not changed by this method.
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
Integer emailBodyTemplateId;
Bool attachMainDocument;
Integer quotedProductsTemplateId;
Bool includeAttachments;
String rawMailSubject;
NSQuotePublishDocuments res = agent.GenerateQuoteDocuments(quoteVersionId, emailBodyTemplateId, attachMainDocument, quotedProductsTemplateId, includeAttachments, rawMailSubject);
GetActivePriceLists(Integer,String)
Gets the available active PriceLists in a specific currency.
Introduced or updated in version: 7.5
Declaration
NSPriceList[] GetActivePriceLists(Integer quoteConnectionId, String currency)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteConnectionId | |
String | currency |
Returns
Type | Description |
---|---|
NSPriceList[] | Will return empty array if there is no PriceList with the stated currency available. |
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
String currency;
NSPriceList[] res = agent.GetActivePriceLists(quoteConnectionId, currency);
GetActivePriceListsByCurrencyId(Integer,Integer)
Gets the available active PriceLists in a specific currency.
Introduced or updated in version: 7.5
Declaration
NSPriceList[] GetActivePriceListsByCurrencyId(Integer quoteConnectionId, Integer currencyId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteConnectionId | |
Integer | currencyId |
Returns
Type | Description |
---|---|
NSPriceList[] | Will return empty array if there is no PriceList with the stated currency available. |
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
Integer currencyId;
NSPriceList[] res = agent.GetActivePriceListsByCurrencyId(quoteConnectionId, currencyId);
GetAllAvailableQuoteConnections()
Gets all available connections. Some installed connections may not be available to the user.
Introduced or updated in version: 7.5
Declaration
NSQuoteConnection[] GetAllAvailableQuoteConnections()
Returns
Type | Description |
---|---|
NSQuoteConnection[] |
Remarks
Use GetAllAvailableQuoteConnectionsWithPriceLists if you need the price lists on the connections as well.
Examples
NSQuoteAgent agent;
NSQuoteConnection[] res = agent.GetAllAvailableQuoteConnections();
GetAllAvailableQuoteConnectionsWithPriceLists()
Gets all available connections. Some installed connections may not be available to the user. Includes price lists for the connection.
Introduced or updated in version: 8.0sr3
Declaration
NSQuoteConnection[] GetAllAvailableQuoteConnectionsWithPriceLists()
Returns
Type | Description |
---|---|
NSQuoteConnection[] |
Remarks
This is a heavy call
Examples
NSQuoteAgent agent;
NSQuoteConnection[] res = agent.GetAllAvailableQuoteConnectionsWithPriceLists();
GetAllInstalledQuoteConnections()
Gets all installed connections. Some installed connections may not be available to the user.
Introduced or updated in version: 7.5
Declaration
NSQuoteConnection[] GetAllInstalledQuoteConnections()
Returns
Type | Description |
---|---|
NSQuoteConnection[] |
Examples
NSQuoteAgent agent;
NSQuoteConnection[] res = agent.GetAllInstalledQuoteConnections();
GetAllPriceLists(Integer,String)
Gets the all PriceLists in all currencies, including those inactive.
Introduced or updated in version: 7.5
Declaration
NSPriceList[] GetAllPriceLists(Integer quoteConnectionId, String currency)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteConnectionId | Primary key of the connection |
String | currency | Iso currency like USD or NOK. See http://www.currency-iso.org/dl_iso_table_a1.xls for details. Case insensitive. |
Returns
Type | Description |
---|---|
NSPriceList[] | Will return an empty array if there is no PriceList with the stated currency available. |
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
String currency;
NSPriceList[] res = agent.GetAllPriceLists(quoteConnectionId, currency);
GetAllPriceListsByCurrencyId(Integer,Integer)
Gets the all PriceLists in all currencies, including those inactive.
Introduced or updated in version: 7.5
Declaration
NSPriceList[] GetAllPriceListsByCurrencyId(Integer quoteConnectionId, Integer currencyId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteConnectionId | |
Integer | currencyId |
Returns
Type | Description |
---|---|
NSPriceList[] | Will return empty array if there is no PriceList available. |
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
Integer currencyId;
NSPriceList[] res = agent.GetAllPriceListsByCurrencyId(quoteConnectionId, currencyId);
GetAllQuoteLineConfigurations()
Returns all the configuration fields
Introduced or updated in version: 7.5
Declaration
NSQuoteLineConfiguration[] GetAllQuoteLineConfigurations()
Returns
Type | Description |
---|---|
NSQuoteLineConfiguration[] |
Examples
NSQuoteAgent agent;
NSQuoteLineConfiguration[] res = agent.GetAllQuoteLineConfigurations();
GetConfigurationFields(Integer,String)
Used by ADMIN. Asks for metadata needed to populate admin dialog that takes in the information needed to create a connection to an ERP system. The values entered in the dialog are stored in the SuperOffice database and used when InitializeConnector is called by the client.
Introduced or updated in version: 7.5
Declaration
Map GetConfigurationFields()
Parameters
Type | Name | Description |
---|---|---|
Integer | connectionId | ID of an existing connection, if any. Initializes connection with current config values if non-zero. |
String | connectorName | Name of the connector. Ignored if connectionId is non-zero. |
Returns
Type | Description |
---|---|
Examples
NSQuoteAgent agent;
Integer connectionId;
String connectorName;
Map res = agent.GetConfigurationFields(connectionId, connectorName);
GetConnection(Integer)
Returns the specified connection.
Introduced or updated in version: 7.5
Declaration
NSQuoteConnection GetConnection(Integer quoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteConnectionId |
Returns
Type | Description |
---|---|
NSQuoteConnection |
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
NSQuoteConnection res = agent.GetConnection(quoteConnectionId);
GetConnectionConfigFields(Integer)
Returns the config fields for the connection.
Introduced or updated in version: 7.5
Declaration
Map GetConnectionConfigFields(Integer quoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteConnectionId | Primary key of the connection. |
Returns
Type | Description |
---|---|
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
Map res = agent.GetConnectionConfigFields(quoteConnectionId);
GetConnectionsForAssociate(Integer)
Returns all connections available for the specified user.
Introduced or updated in version: 7.5
Declaration
NSQuoteConnection[] GetConnectionsForAssociate(Integer associateId)
Parameters
Type | Name | Description |
---|---|---|
Integer | associateId |
Returns
Type | Description |
---|---|
NSQuoteConnection[] |
Examples
NSQuoteAgent agent;
Integer associateId;
NSQuoteConnection[] res = agent.GetConnectionsForAssociate(associateId);
GetConnectionStartupErrors()
Returns an array of PluginResponseInfos for all failed connection initializations.
Introduced or updated in version: 7.5
Declaration
NSPluginResponse[] GetConnectionStartupErrors()
Returns
Type | Description |
---|---|
NSPluginResponse[] |
Examples
NSQuoteAgent agent;
NSPluginResponse[] res = agent.GetConnectionStartupErrors();
GetConnectionStartupResponse(Integer)
Returns the PluginResponseInfo for the connection initialization.
Introduced or updated in version: 7.5
Declaration
NSPluginResponse GetConnectionStartupResponse(Integer quoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteConnectionId |
Returns
Type | Description |
---|---|
NSPluginResponse |
Remarks
Does not initialize the connection, just returns what happened when initialize was called.
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
NSPluginResponse res = agent.GetConnectionStartupResponse(quoteConnectionId);
GetConnectorCapabilities(Integer)
Gets a list of connector capabilities
Introduced or updated in version: 7.5
Declaration
String[] GetConnectorCapabilities(Integer quoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteConnectionId |
Returns
Type | Description |
---|---|
String[] |
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
String[] res = agent.GetConnectorCapabilities(quoteConnectionId);
GetConnectorCapabilityNames(Integer)
Gets a list of all possible connector capabilities
Introduced or updated in version: 7.5
Declaration
String[] GetConnectorCapabilityNames(Integer quoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteConnectionId |
Returns
Type | Description |
---|---|
String[] |
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
String[] res = agent.GetConnectorCapabilityNames(quoteConnectionId);
GetExtraInfo(String)
Converts an XML string into an object representation.
Introduced or updated in version: 7.5
Declaration
NSProductExtraDataField[] GetExtraInfo(String quoteLineExtraData)
Parameters
Type | Name | Description |
---|---|---|
String | quoteLineExtraData |
Returns
Type | Description |
---|---|
NSProductExtraDataField[] |
Examples
NSQuoteAgent agent;
String quoteLineExtraData;
NSProductExtraDataField[] res = agent.GetExtraInfo(quoteLineExtraData);
GetInUseQuoteLineConfigurations()
Returns the configuration fields that should be visible in the GUI.
Introduced or updated in version: 7.5
Declaration
NSQuoteLineConfiguration[] GetInUseQuoteLineConfigurations()
Returns
Type | Description |
---|---|
NSQuoteLineConfiguration[] |
Examples
NSQuoteAgent agent;
NSQuoteLineConfiguration[] res = agent.GetInUseQuoteLineConfigurations();
GetOrderConfirmation(Integer,Integer)
Gets a base64-encoded data stream that is just the order confirmation document, for the given quote version; no permanent document is created or stored anywhere; the result is a PDF
Introduced or updated in version: 7.5
Declaration
String GetOrderConfirmation(Integer quoteVersionId, Integer confirmationTemplateId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId | |
Integer | confirmationTemplateId |
Returns
Type | Description |
---|---|
String |
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
Integer confirmationTemplateId;
String res = agent.GetOrderConfirmation(quoteVersionId, confirmationTemplateId);
GetOrderState(Integer)
If there is a problem with a quoteline, the error description shall be placed in the status and reason fields of the quoteline, if there is a problem with the alternative, the error description shall be placed in the status and reason fields of the alternative. A summary of all the problems (if any) should be placed in the response object. Requires that the Create-Order capability is true.
Introduced or updated in version: 7.5
Declaration
NSPluginUrlResponse GetOrderState(Integer quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId |
Returns
Type | Description |
---|---|
NSPluginUrlResponse |
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSPluginUrlResponse res = agent.GetOrderState(quoteVersionId);
GetPriceList(Integer)
Gets an NSPriceList object.
Introduced or updated in version: 7.5
Declaration
NSPriceList GetPriceList(Integer priceListId)
Parameters
Type | Name | Description |
---|---|---|
Integer | priceListId |
Returns
Type | Description |
---|---|
NSPriceList |
Examples
NSQuoteAgent agent;
NSPriceList thing = agent.GetPriceList(123);
GetProduct(Integer,String)
Gets a product with the given key
Introduced or updated in version: 7.5
Declaration
NSProduct GetProduct(Integer quoteConnectionId, String eRPProductKey)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteConnectionId | |
String | eRPProductKey |
Returns
Type | Description |
---|---|
NSProduct |
GetProductFromDbId(Integer)
Gets a product with the given database ID
Introduced or updated in version: 7.5
Declaration
NSProduct GetProductFromDbId(Integer productId)
Parameters
Type | Name | Description |
---|---|---|
Integer | productId |
Returns
Type | Description |
---|---|
NSProduct |
Examples
NSQuoteAgent agent;
Integer productId;
NSProduct res = agent.GetProductFromDbId(productId);
GetProductImage(Integer,String,Integer)
Gets an image connected to a product, from the ProductProvider
Introduced or updated in version: 7.5
Declaration
String GetProductImage(Integer quoteConnectionId, String eRPProductKey, Integer rank)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteConnectionId | |
String | eRPProductKey | |
Integer | rank |
Returns
Type | Description |
---|---|
String |
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
String eRPProductKey;
Integer rank;
String res = agent.GetProductImage(quoteConnectionId, eRPProductKey, rank);
GetQuote(Integer)
Gets an NSQuote
Introduced or updated in version: 7.5
Declaration
NSQuote GetQuote(Integer quoteId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteId |
Returns
Type | Description |
---|---|
NSQuote |
Examples
NSQuoteAgent agent;
Integer quoteId;
NSQuote res = agent.GetQuote(quoteId);
GetQuoteAlternative(Integer)
Gets an NSQuoteAlternative object.
Introduced or updated in version: 7.5
Declaration
NSQuoteAlternative GetQuoteAlternative(Integer quoteAlternativeId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteAlternativeId |
Returns
Type | Description |
---|---|
NSQuoteAlternative |
Examples
NSQuoteAgent agent;
NSQuoteAlternative thing = agent.GetQuoteAlternative(123);
GetQuoteAlternatives(Integer)
Gets all quote alternatives for a quote version
Introduced or updated in version: 7.5
Declaration
NSQuoteAlternative[] GetQuoteAlternatives(Integer quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId |
Returns
Type | Description |
---|---|
NSQuoteAlternative[] |
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSQuoteAlternative[] res = agent.GetQuoteAlternatives(quoteVersionId);
GetQuoteEntity(Integer)
Gets a Quote
Introduced or updated in version: 7.5
Declaration
NSQuoteEntity GetQuoteEntity(Integer quoteId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteId |
Returns
Type | Description |
---|---|
NSQuoteEntity |
Examples
NSQuoteAgent agent;
Integer quoteId;
NSQuoteEntity res = agent.GetQuoteEntity(quoteId);
GetQuoteEntityFromSaleId(Integer)
Gets a Quote for a sale
Introduced or updated in version: 7.5
Declaration
NSQuoteEntity GetQuoteEntityFromSaleId(Integer saleId)
Parameters
Type | Name | Description |
---|---|---|
Integer | saleId |
Returns
Type | Description |
---|---|
NSQuoteEntity |
Examples
NSQuoteAgent agent;
Integer saleId;
NSQuoteEntity res = agent.GetQuoteEntityFromSaleId(saleId);
GetQuoteFromSaleId(Integer)
Gets an NSQuote for a sale
Introduced or updated in version: 7.5
Declaration
NSQuote GetQuoteFromSaleId(Integer saleId)
Parameters
Type | Name | Description |
---|---|---|
Integer | saleId |
Returns
Type | Description |
---|---|
NSQuote |
Examples
NSQuoteAgent agent;
Integer saleId;
NSQuote res = agent.GetQuoteFromSaleId(saleId);
GetQuoteLine(Integer)
Gets QuoteLine from database
Introduced or updated in version: 7.5
Declaration
NSQuoteLine GetQuoteLine(Integer quoteLineId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteLineId |
Returns
Type | Description |
---|---|
NSQuoteLine |
Examples
NSQuoteAgent agent;
Integer quoteLineId;
NSQuoteLine res = agent.GetQuoteLine(quoteLineId);
GetQuoteLineConfiguration(Integer)
Returns the configuration field with the given ID
Introduced or updated in version: 7.5
Declaration
NSQuoteLineConfiguration GetQuoteLineConfiguration(Integer quoteLineConfigurationId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteLineConfigurationId |
Returns
Type | Description |
---|---|
NSQuoteLineConfiguration |
Examples
NSQuoteAgent agent;
Integer quoteLineConfigurationId;
NSQuoteLineConfiguration res = agent.GetQuoteLineConfiguration(quoteLineConfigurationId);
GetQuoteLineConfigurationFromFieldName(String)
Returns the configuration field with the given field name
Introduced or updated in version: 7.5
Declaration
NSQuoteLineConfiguration GetQuoteLineConfigurationFromFieldName(String fieldName)
Parameters
Type | Name | Description |
---|---|---|
String | fieldName |
Returns
Type | Description |
---|---|
NSQuoteLineConfiguration |
Examples
NSQuoteAgent agent;
String fieldName;
NSQuoteLineConfiguration res = agent.GetQuoteLineConfigurationFromFieldName(fieldName);
GetQuoteLineImage(Integer,Integer)
Gets an image connected to a quoteline, either from the ERPProvider or from the SuperOffice database
Introduced or updated in version: 7.5
Declaration
NSImage GetQuoteLineImage(Integer quoteLineId, Integer rank)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteLineId | |
Integer | rank |
Returns
Type | Description |
---|---|
NSImage |
Examples
NSQuoteAgent agent;
Integer quoteLineId;
Integer rank;
NSImage res = agent.GetQuoteLineImage(quoteLineId, rank);
GetQuoteLines(Integer)
Gets all QuoteLines from an alternative
Introduced or updated in version: 7.5
Declaration
NSQuoteLine[] GetQuoteLines(Integer quoteAlternativeId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteAlternativeId |
Returns
Type | Description |
---|---|
NSQuoteLine[] |
Examples
NSQuoteAgent agent;
Integer quoteAlternativeId;
NSQuoteLine[] res = agent.GetQuoteLines(quoteAlternativeId);
GetQuoteList(String)
Gets a named list from the connector.
Introduced or updated in version: 7.5
Declaration
NSQuoteListItem[] GetQuoteList(String quoteListType)
Parameters
Type | Name | Description |
---|---|---|
String | quoteListType |
Returns
Type | Description |
---|---|
NSQuoteListItem[] | Array of QuoteListItems; NULL if the given list is not supported. |
Examples
NSQuoteAgent agent;
String quoteListType;
NSQuoteListItem[] res = agent.GetQuoteList(quoteListType);
GetQuoteVersion(Integer)
Gets an NSQuoteVersion
Introduced or updated in version: 7.5
Declaration
NSQuoteVersion GetQuoteVersion(Integer quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId |
Returns
Type | Description |
---|---|
NSQuoteVersion |
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSQuoteVersion res = agent.GetQuoteVersion(quoteVersionId);
GetQuoteVersions(Integer)
Gets all quote versions for a sale
Introduced or updated in version: 7.5
Declaration
NSQuoteVersion[] GetQuoteVersions(Integer quoteId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteId |
Returns
Type | Description |
---|---|
NSQuoteVersion[] |
Examples
NSQuoteAgent agent;
Integer quoteId;
NSQuoteVersion[] res = agent.GetQuoteVersions(quoteId);
GetQuoteVersionWorkflowButtonStates(Integer,Integer)
Gets all button states for the Quote version dialog.
Introduced or updated in version: 7.5
Declaration
NSQuoteVersionWorkflowState GetQuoteVersionWorkflowButtonStates(Integer quoteVersionId, Integer quoteAlternativeId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId | |
Integer | quoteAlternativeId |
Returns
Type | Description |
---|---|
NSQuoteVersionWorkflowState |
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
Integer quoteAlternativeId;
NSQuoteVersionWorkflowState res = agent.GetQuoteVersionWorkflowButtonStates(quoteVersionId, quoteAlternativeId);
GetQuoteVersionWorkflowImageState(Integer)
Gets state icon and name for the Quote version dialog header.
Introduced or updated in version: 7.5
Declaration
NSQuoteVersionButtonState GetQuoteVersionWorkflowImageState(Integer quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId |
Returns
Type | Description |
---|---|
NSQuoteVersionButtonState |
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSQuoteVersionButtonState res = agent.GetQuoteVersionWorkflowImageState(quoteVersionId);
GetQuoteVersionWorkflowState(Integer,Integer)
Gets all button states for the Quote version dialog. Packages ImageState, Button states and status info into one call.
Introduced or updated in version: 7.5
Declaration
NSQuoteVersionWorkflowState GetQuoteVersionWorkflowState(Integer quoteVersionId, Integer quoteAlternativeId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId | |
Integer | quoteAlternativeId |
Returns
Type | Description |
---|---|
NSQuoteVersionWorkflowState |
Remarks
Collects most important warnings/errors from across all quote lines/alternatives in this quote version.
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
Integer quoteAlternativeId;
NSQuoteVersionWorkflowState res = agent.GetQuoteVersionWorkflowState(quoteVersionId, quoteAlternativeId);
GetQuoteVersionWorkflowStatusInfo(Integer)
Gets status info for the Quote version dialog header.
Introduced or updated in version: 7.5
Declaration
NSQuoteVersionStatusInformation GetQuoteVersionWorkflowStatusInfo(Integer quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId |
Returns
Type | Description |
---|---|
NSQuoteVersionStatusInformation |
Remarks
Collects most important warnings/errors from across all quote lines/alternatives in this quote version.
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSQuoteVersionStatusInformation res = agent.GetQuoteVersionWorkflowStatusInfo(quoteVersionId);
HasConnections()
Introduced or updated in version: 7.5
Declaration
NSPluginResponse HasConnections()
Returns
Type | Description |
---|---|
NSPluginResponse | Whether or not the system has any connections available for this user. |
Examples
NSQuoteAgent agent;
NSPluginResponse res = agent.HasConnections();
IncludeQuoteVersionAttachment(Integer,Integer,Bool)
Toggles the 'included' state of a quote version attachment
Introduced or updated in version: 7.5
Declaration
Bool IncludeQuoteVersionAttachment(Integer quoteVersionId, Integer documentId, Bool include)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId | |
Integer | documentId | |
Bool | include |
Returns
Type | Description |
---|---|
Bool |
Remarks
Throws exceptions if called on locked versions
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
Integer documentId;
Bool include;
Bool res = agent.IncludeQuoteVersionAttachment(quoteVersionId, documentId, include);
MoveQuoteLine(Integer,Bool)
Moves quote line rank up/down
Introduced or updated in version: 7.5
Declaration
Void MoveQuoteLine(Integer quoteLineId, Bool direction)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteLineId | |
Bool | direction |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAgent agent;
Integer quoteLineId;
Bool direction;
agent.MoveQuoteLine(quoteLineId, direction);
PlaceOrder(Integer,Bool,String,String,String)
Places an order in the ERP system.
Introduced or updated in version: 7.5
Declaration
NSPluginUrlResponse PlaceOrder(Integer quoteAlternativeId, Bool markSaleAsSold, String poNumber, String orderComment, String culture)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteAlternativeId | |
Bool | markSaleAsSold | |
String | poNumber | |
String | orderComment | |
String | culture |
Returns
Type | Description |
---|---|
NSPluginUrlResponse |
Examples
NSQuoteAgent agent;
Integer quoteAlternativeId;
Bool markSaleAsSold;
String poNumber;
String orderComment;
String culture;
NSPluginUrlResponse res = agent.PlaceOrder(quoteAlternativeId, markSaleAsSold, poNumber, orderComment, culture);
RecalculateQuoteAlternative(Integer)
When the user changes one or more values in a quoteline or a quoteAlternative, the connector gets to change the QuoteLines and the alternative, for instance calculate VAT. RecalculateQuoteAlternative shall be called when the user changes any of the following fields: Quantity, DiscountAmount, DiscountPercent, listprice (if allowed). RecalculateQuoteAlternative will calculate the TotalPrice and the VAT (if possible) for the lines and the alternative.
Introduced or updated in version: 7.5
Declaration
NSQuoteAlternativeRecalculated RecalculateQuoteAlternative(Integer quoteAlternative)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteAlternative |
Returns
Type | Description |
---|---|
NSQuoteAlternativeRecalculated |
Examples
NSQuoteAgent agent;
Integer quoteAlternative;
NSQuoteAlternativeRecalculated res = agent.RecalculateQuoteAlternative(quoteAlternative);
RecalculateQuoteLine(NSQuoteLine,String[])
When the user changes one or more values in a quoteline, the connector gets to change the QuoteLine, for instance calculate VAT. Shall be called when the user changes any of the following fields: Quantity, DiscountAmount, DiscountPercent, ListPrice (if allowed). Will calculate the TotalPrice and the VAT (if possible) for the line.
Introduced or updated in version: 7.5
Declaration
NSQuoteLine RecalculateQuoteLine(NSQuoteLine quoteLine, String[] changedFields)
Parameters
Type | Name | Description |
---|---|---|
NSQuoteLine | quoteLine | |
String[] | changedFields |
Returns
Type | Description |
---|---|
NSQuoteLine |
Examples
NSQuoteAgent agent;
NSQuoteLine quoteLine;
String[] changedFields;
NSQuoteLine res = agent.RecalculateQuoteLine(quoteLine, changedFields);
RejectQuoteVersion(Integer,String,Integer,String)
Rejects a quote version
Introduced or updated in version: 7.5
Declaration
NSApproveRejectResponse RejectQuoteVersion(Integer quoteVersionId, String rejectedByText, Integer rejectedByAssociateId, String rejectionText)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId | |
String | rejectedByText | |
Integer | rejectedByAssociateId | |
String | rejectionText |
Returns
Type | Description |
---|---|
NSApproveRejectResponse |
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
String rejectedByText;
Integer rejectedByAssociateId;
String rejectionText;
NSApproveRejectResponse res = agent.RejectQuoteVersion(quoteVersionId, rejectedByText, rejectedByAssociateId, rejectionText);
RemoveProduct(Integer)
Removes a product from the database
Introduced or updated in version: 7.5
Declaration
Void RemoveProduct(Integer productId)
Parameters
Type | Name | Description |
---|---|---|
Integer | productId |
Returns
Type | Description |
---|---|
Void |
RestoreConnection(Integer)
Restores a connection marked as deleted.
Introduced or updated in version: 7.5
Declaration
Void RestoreConnection(Integer quoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteConnectionId |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
agent.RestoreConnection(quoteConnectionId);
SaveConnection(NSQuoteConnection)
Saves a connection to the database.
Introduced or updated in version: 7.5
Declaration
NSQuoteConnection SaveConnection(NSQuoteConnection connection)
Parameters
Type | Name | Description |
---|---|---|
NSQuoteConnection | connection |
Returns
Type | Description |
---|---|
NSQuoteConnection |
Examples
NSQuoteAgent agent;
NSQuoteConnection connection;
NSQuoteConnection res = agent.SaveConnection(connection);
SaveConnectionConfigFields(Integer,Map)
Saves the connection config fields.
Introduced or updated in version: 7.5
Declaration
Map SaveConnectionConfigFields(Integer quoteConnectionId, Map connectionConfigFields)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteConnectionId | Primary key of the connection |
connectionConfigFields |
Returns
Type | Description |
---|---|
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
Map connectionConfigFields;
Map res = agent.SaveConnectionConfigFields(quoteConnectionId, connectionConfigFields);
SavePriceList(NSPriceList)
Updates the existing NSPriceList or creates a new NSPriceList if the id parameter is 0
Introduced or updated in version: 7.5
Declaration
NSPriceList SavePriceList(NSPriceList priceList)
Parameters
Type | Name | Description |
---|---|---|
NSPriceList | priceList | The NSPriceList to save. |
Returns
Type | Description |
---|---|
NSPriceList |
Examples
NSQuote agent;
NSPriceList thing = agent.CreateDefaultPriceList();
thing = agent.SavePriceList(thing);
SaveProduct(NSProduct)
Updates the existing NSProduct or creates a new NSProduct if the id parameter is 0
Introduced or updated in version: 7.5
Declaration
NSProduct SaveProduct(NSProduct product)
Parameters
Type | Name | Description |
---|---|---|
NSProduct | product | The NSProduct to save. |
Returns
Type | Description |
---|---|
NSProduct |
Examples
NSQuote agent;
NSProduct thing = agent.CreateDefaultProduct();
thing = agent.SaveProduct(thing);
SaveQuote(NSQuote)
Saves an NSQuote
Introduced or updated in version: 7.5
Declaration
NSQuote SaveQuote(NSQuote quote)
Parameters
Type | Name | Description |
---|---|---|
NSQuote | quote |
Returns
Type | Description |
---|---|
NSQuote |
Examples
NSQuoteAgent agent;
NSQuote quote;
NSQuote res = agent.SaveQuote(quote);
SaveQuoteAlternative(NSQuoteAlternative)
Updates the existing NSQuoteAlternative or creates a new NSQuoteAlternative if the id parameter is 0
Introduced or updated in version: 7.5
Declaration
NSQuoteAlternative SaveQuoteAlternative(NSQuoteAlternative quoteAlternative)
Parameters
Type | Name | Description |
---|---|---|
NSQuoteAlternative | quoteAlternative | The NSQuoteAlternative to save. |
Returns
Type | Description |
---|---|
NSQuoteAlternative |
Examples
NSQuoteAgent agent;
NSQuoteAlternative thing = agent.CreateDefaultQuoteAlternative();
thing = agent.SaveQuoteAlternative(thing);
SaveQuoteEntity(NSQuoteEntity)
Saves an NSQuoteEntity.
Introduced or updated in version: 7.5
Declaration
NSQuoteEntity SaveQuoteEntity(NSQuoteEntity quoteEntity)
Parameters
Type | Name | Description |
---|---|---|
NSQuoteEntity | quoteEntity |
Returns
Type | Description |
---|---|
NSQuoteEntity |
Remarks
Versions and alternatives will not be saved by this call.
Examples
NSQuoteAgent agent;
NSQuoteEntity quoteEntity;
NSQuoteEntity res = agent.SaveQuoteEntity(quoteEntity);
SaveQuoteLine(NSQuoteLine)
Saves the NSQuoteLine in the SuperOffice database
Introduced or updated in version: 7.5
Declaration
NSQuoteLine SaveQuoteLine(NSQuoteLine quoteLine)
Parameters
Type | Name | Description |
---|---|---|
NSQuoteLine | quoteLine |
Returns
Type | Description |
---|---|
NSQuoteLine |
Examples
NSQuoteAgent agent;
NSQuoteLine quoteLine;
NSQuoteLine res = agent.SaveQuoteLine(quoteLine);
SaveQuoteLineConfiguration(NSQuoteLineConfiguration)
Saves an NSQuoteLineConfiguration object. It is not possible to add a new configuration.
Introduced or updated in version: 7.5
Declaration
NSQuoteLineConfiguration SaveQuoteLineConfiguration(NSQuoteLineConfiguration quoteLineConfiguration)
Parameters
Type | Name | Description |
---|---|---|
NSQuoteLineConfiguration | quoteLineConfiguration |
Returns
Type | Description |
---|---|
NSQuoteLineConfiguration |
Examples
NSQuoteAgent agent;
NSQuoteLineConfiguration quoteLineConfiguration;
NSQuoteLineConfiguration res = agent.SaveQuoteLineConfiguration(quoteLineConfiguration);
SaveQuoteLineConfigurations()
Saves a collection of QuoteLineConfigurations. It is not possible to add a new configurations.
Introduced or updated in version: 7.5
Declaration
NSQuoteLineConfiguration[] SaveQuoteLineConfigurations(NSQuoteLineConfiguration[] quoteLineConfigurations)
Parameters
Type | Name | Description |
---|---|---|
NSQuoteLineConfiguration[] | quoteLineConfigurations |
Returns
Type | Description |
---|---|
NSQuoteLineConfiguration[] |
Examples
NSQuoteAgent agent;
NSQuoteLineConfiguration[] quoteLineConfigurations;
NSQuoteLineConfiguration[] res = agent.SaveQuoteLineConfigurations(quoteLineConfigurations);
SaveQuoteLineImage(Integer,NSImage,Integer)
Saves the image connected to a quoteline in the SuperOffice database
Introduced or updated in version: 7.5
Declaration
Void SaveQuoteLineImage(Integer quoteLineId, NSImage image, Integer rank)
Parameters
Type | Name | Description |
---|---|---|
quoteLineId | ||
image | ||
Integer | rank |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAgent agent;
Integer quoteLineId;
NSImage image;
Integer rank;
agent.SaveQuoteLineImage(quoteLineId, image, rank);
SaveQuoteLines(NSQuoteLine[])
Saves the QuoteLines in the SuperOffice database
Introduced or updated in version: 7.5
Declaration
NSQuoteLine[] SaveQuoteLines(NSQuoteLine[] quoteLines)
Parameters
Type | Name | Description |
---|---|---|
NSQuoteLine[] | quoteLines |
Returns
Type | Description |
---|---|
NSQuoteLine[] |
Examples
NSQuoteAgent agent;
NSQuoteLine[] quoteLines;
NSQuoteLine[] res = agent.SaveQuoteLines(quoteLines);
SaveQuoteVersion(NSQuoteVersion)
Saves a quote version
Introduced or updated in version: 7.5
Declaration
NSQuoteVersion SaveQuoteVersion(NSQuoteVersion quoteVersion)
Parameters
Type | Name | Description |
---|---|---|
NSQuoteVersion | quoteVersion |
Returns
Type | Description |
---|---|
NSQuoteVersion |
Examples
NSQuoteAgent agent;
NSQuoteVersion quoteVersion;
NSQuoteVersion res = agent.SaveQuoteVersion(quoteVersion);
SaveQuoteVersionNumber(Integer,String)
Save the quote version number if it is valid
Introduced or updated in version: 7.5
Declaration
Bool SaveQuoteVersionNumber(Integer quoteVersionId, String number)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId | |
String | number |
Returns
Type | Description |
---|---|
Bool |
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
String number;
Bool res = agent.SaveQuoteVersionNumber(quoteVersionId, number);
SendQuoteVersion(Integer,DateTime,DateTime,String,String)
Sends the quote to the user's customer.
Introduced or updated in version: 7.5
Declaration
NSPluginUrlResponse SendQuoteVersion(Integer quoteVersionId, DateTime expiryDate, DateTime followupDate, String followupText, String culture)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId | |
expiryDate | ||
followupDate | ||
String | followupText | |
String | culture |
Returns
Type | Description |
---|---|
NSPluginUrlResponse |
Remarks
More parameters to be added later...
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
DateTime expiryDate;
DateTime followupDate;
String followupText;
String culture;
NSPluginUrlResponse res = agent.SendQuoteVersion(quoteVersionId, expiryDate, followupDate, followupText, culture);
TestConnection(String)
Tests if the connection data is sufficient to get a connection with the ERP system. The Connector should try to do some operations to check if the connection has sufficient rights to run. The connection has not been created yet. TestConnection()is called without InitializeConnector being called first.
Introduced or updated in version: 7.5
Declaration
NSPluginResponse TestConnection(String connectorName, Map connectionData)
Parameters
Type | Name | Description |
---|---|---|
String | connectorName |
Returns
Type | Description |
---|---|
NSPluginResponse | how the test went. |
Remarks
Used by the Admin clients
Examples
NSQuoteAgent agent;
String connectorName;
Map connectionData;
NSPluginResponse res = agent.TestConnection(connectorName, connectionData);
ToggleProductInAssortment(Integer)
Toggles if the product is in assortment or not
Introduced or updated in version: 7.5
Declaration
Void ToggleProductInAssortment(Integer productId)
Parameters
Type | Name | Description |
---|---|---|
Integer | productId |
Returns
Type | Description |
---|---|
Void |
ToggleQuoteVersionAttachmentIncluded(Integer)
Toggle the 'included' state of a quote version attachment
Introduced or updated in version: 7.5
Declaration
Bool ToggleQuoteVersionAttachmentIncluded(Integer quoteVersionAttachmentId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionAttachmentId |
Returns
Type | Description |
---|---|
Bool |
Examples
NSQuoteAgent agent;
Integer quoteVersionAttachmentId;
Bool res = agent.ToggleQuoteVersionAttachmentIncluded(quoteVersionAttachmentId);
ToggleSaleTypeQuoteAttachmentDefaultIncluded(Integer)
Toggles the 'default included' state of a sale type quote attachment
Introduced or updated in version: 7.5
Declaration
Bool ToggleSaleTypeQuoteAttachmentDefaultIncluded(Integer saleTypeQuoteAttachmentId)
Parameters
Type | Name | Description |
---|---|---|
Integer | saleTypeQuoteAttachmentId |
Returns
Type | Description |
---|---|
Bool |
Examples
NSQuoteAgent agent;
Integer saleTypeQuoteAttachmentId;
Bool res = agent.ToggleSaleTypeQuoteAttachmentDefaultIncluded(saleTypeQuoteAttachmentId);
UpdateQuoteVersionPrices(Integer)
Updates price on the all the quote lines for each alternative in the current quote version
Introduced or updated in version: 7.5
Declaration
NSQuoteVersionValidated UpdateQuoteVersionPrices(Integer quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId |
Returns
Type | Description |
---|---|
NSQuoteVersionValidated |
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSQuoteVersionValidated res = agent.UpdateQuoteVersionPrices(quoteVersionId);
ValidateQuoteVersion(Integer,Integer)
When the user changes one or more values in a quoteline or a quoteAlternative, the connector gets to change the QuoteLines and the alternative, for instance calculate VAT. ValidateQuoteVersion shall be called when the user presses the validate button, presses the send button or closes the quote dialog.
Introduced or updated in version: 7.5
Declaration
NSQuoteVersionValidated ValidateQuoteVersion(Integer quoteVersionId, Integer action)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId | |
Integer | action |
Returns
Type | Description |
---|---|
NSQuoteVersionValidated |
Remarks
RecalculateQuoteAlternative should typically validate all alternatives, set values in extrafields, and set the state in the version.
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
Integer action;
NSQuoteVersionValidated res = agent.ValidateQuoteVersion(quoteVersionId, action);