Class NSQuoteAlternative
Information about a connection to the ERP system.
Syntax
Constructors
NSQuoteAlternative()
Initializes a new instance of the NSQuoteAlternative class.
Introduced or updated in version: 7.5
Declaration
NSQuoteAlternative
Methods
GetDescription()
Introduced or updated in version: 7.5
Declaration
String GetDescription()
Returns
Type | Description |
---|---|
String | The tool-tip to use in the user interface (on the tab, for instance). |
Examples
NSQuoteAlternative thing;
String description = thing.GetDescription();
GetDiscountAmount()
Introduced or updated in version: 7.5
Declaration
Float GetDiscountAmount()
Returns
Type | Description |
---|---|
Float | The discount the sales rep specifies, in whatever currency the sale is in. |
Remarks
Both the two 'DiscountPercent' and 'DiscountAmount' shall be filled out, but the UserValueOverride field must be set to the field the user actually changed. If this field is filled out by the user, it overrides the discount suggested by the connector. If the user has not filled any values, the system will copy the ERP discount amount value into this field.
Examples
NSQuoteAlternative thing;
Float discountAmount = thing.GetDiscountAmount();
GetDiscountPercent()
Introduced or updated in version: 7.5
Declaration
Float GetDiscountPercent()
Returns
Type | Description |
---|---|
Float | The discount the sales rep specifies, in percent. '12%' is represented as '12'. |
Remarks
Both the two 'DiscountPercent' and 'DiscountAmount' shall be filled out, but the UserValueOverride field must be set to the field the user actually changed. If this field is filled out by the user, it overrides the discount suggested by the connector. If the user has not filled any values, the system will copy the ERP discount percent value into this field.
Examples
NSQuoteAlternative thing;
Float discountPercent = thing.GetDiscountPercent();
GetEarningAmount()
Introduced or updated in version: 7.5
Declaration
Float GetEarningAmount()
Returns
Type | Description |
---|---|
Float | Earning on this alternative, as an absolute amount. |
Examples
NSQuoteAlternative thing;
Float earningAmount = thing.GetEarningAmount();
GetEarningPercent()
Introduced or updated in version: 7.5
Declaration
Float GetEarningPercent()
Returns
Type | Description |
---|---|
Float | The earning on this alternative, in percent of total. The Percentage is given in integer form, '12%' is represented as '12'. |
Examples
NSQuoteAlternative thing;
Float earningPercent = thing.GetEarningPercent();
GetERPDiscountAmount()
Can be overridden by the user in the field 'DiscountPercent' or 'DiscountAmount'. Both the two 'ERPDiscountPercent' and 'ERPDiscountAmount' shall be filled out. If UserValueOverride is 'None', then the ERPDiscountAmount shall be copied into DiscountAmount and ERPDiscountPercent into DiscountPercent.
Introduced or updated in version: 7.5
Declaration
Float GetERPDiscountAmount()
Returns
Type | Description |
---|---|
Float | The discount the system calculates based on customer /amount / whatever. |
Examples
NSQuoteAlternative thing;
Float eRPDiscountAmount = thing.GetERPDiscountAmount();
GetERPDiscountPercent()
Introduced or updated in version: 7.5
Declaration
Float GetERPDiscountPercent()
Returns
Type | Description |
---|---|
Float | The discount the system calculates based on customer /amount / whatever. The Percentage is given in integer form, '12%' is represented as '12'. |
Remarks
Can be overridden by the sales rep in the field 'DiscountPercent' or 'DiscountAmount'. Both the two 'ERPDiscountPercent' and 'ERPDiscountAmount' shall be filled out. If UserValueOverride is 'None', then the ERPDiscountAmount shall be copied into DiscountAmount and ERPDiscountPercent into DiscountPercent.
Examples
NSQuoteAlternative thing;
Float eRPDiscountPercent = thing.GetERPDiscountPercent();
GetERPQuoteAlternativeKey()
Introduced or updated in version: 7.5
Declaration
String GetERPQuoteAlternativeKey()
Returns
Type | Description |
---|---|
String | Key that identifies this alternative in the ERP system, if it exists there. |
Examples
NSQuoteAlternative thing;
String eRPQuoteAlternativeKey = thing.GetERPQuoteAlternativeKey();
GetExtraField1()
Introduced or updated in version: 7.5
Declaration
String GetExtraField1()
Returns
Type | Description |
---|---|
String | Optional information added by Quote Connector; usable in the quote document merge process. |
Examples
NSQuoteAlternative thing;
String extraField1 = thing.GetExtraField1();
GetExtraField2()
Introduced or updated in version: 7.5
Declaration
String GetExtraField2()
Returns
Type | Description |
---|---|
String | Optional information added by Quote Connector; usable in the quote document merge process. |
Examples
NSQuoteAlternative thing;
String extraField2 = thing.GetExtraField2();
GetExtraField3()
Introduced or updated in version: 7.5
Declaration
String GetExtraField3()
Returns
Type | Description |
---|---|
String | Optional information added by Quote Connector; usable in the quote document merge process. |
Examples
NSQuoteAlternative thing;
String extraField3 = thing.GetExtraField3();
GetExtraField4()
Introduced or updated in version: 7.5
Declaration
String GetExtraField4()
Returns
Type | Description |
---|---|
String | Optional information added by Quote Connector; usable in the quote document merge process. |
Examples
NSQuoteAlternative thing;
String extraField4 = thing.GetExtraField4();
GetExtraField5()
Introduced or updated in version: 7.5
Declaration
String GetExtraField5()
Returns
Type | Description |
---|---|
String | Optional information added by Quote Connector; usable in the quote document merge process. |
Examples
NSQuoteAlternative thing;
String extraField5 = thing.GetExtraField5();
GetName()
Introduced or updated in version: 7.5
Declaration
String GetName()
Returns
Type | Description |
---|---|
String | Name of Alternative. Shown in tab in user interface, intentionally kept short. |
Examples
NSQuoteAlternative thing;
String name = thing.GetName();
GetQuoteAlternativeId()
Introduced or updated in version: 7.5
Declaration
Integer GetQuoteAlternativeId()
Returns
Type | Description |
---|---|
Integer | Primary key. |
Examples
NSQuoteAlternative thing;
Integer quoteAlternativeId = thing.GetQuoteAlternativeId();
GetQuoteVersionId()
Introduced or updated in version: 7.5
Declaration
Integer GetQuoteVersionId()
Returns
Type | Description |
---|---|
Integer | The version that owns this alternative (the chain is Sale 1->1 Quote 1->+ QuoteVersion 1->+ QuoteAlternative. |
Examples
NSQuoteAlternative thing;
Integer quoteVersionId = thing.GetQuoteVersionId();
GetReason()
Introduced or updated in version: 7.5
Declaration
String GetReason()
Returns
Type | Description |
---|---|
String | If there was a problem, this field contains a localized explanation of the problem and possible steps to fix it that the user can be shown. |
Examples
NSQuoteAlternative thing;
String reason = thing.GetReason();
GetStatus()
Introduced or updated in version: 7.5
Declaration
Integer GetStatus()
Returns
Type | Description |
---|---|
Integer | If there was a problem with for instance calculation, this field is set to warning or error. See QuoteStatus. |
Examples
NSQuoteAlternative thing;
Integer status = thing.GetStatus();
GetSubTotal()
Introduced or updated in version: 7.5
Declaration
Float GetSubTotal()
Returns
Type | Description |
---|---|
Float | Value to help the user interface, is computed by summing the total price of the quote lines, and NOT by summing their subtotals. |
Examples
NSQuoteAlternative thing;
Float subTotal = thing.GetSubTotal();
GetTotalPrice()
Introduced or updated in version: 7.5
Declaration
Float GetTotalPrice()
Returns
Type | Description |
---|---|
Float | Sum of the QuoteLines.TotalPrice, AlternativeDiscount or QuoteLines.TotalCost + Earning based on what, if anything, the user has entered last. Shall be calculated by the connector. |
Examples
NSQuoteAlternative thing;
Float totalPrice = thing.GetTotalPrice();
GetUserValueOverride()
Introduced or updated in version: 7.5
Declaration
Integer GetUserValueOverride()
Returns
Type | Description |
---|---|
Integer | Has the pre-calculated (from ERP) price information been overridden, and how. See ValueOverride. |
Remarks
If the user has filled out the discountpercentage field, then the UserValueOverride field is set to OverridePercent. (The DiscountAmount, EarningPercent, EarningAmount and TotalPrice fields are calculated based on the discountPercent.)
Examples
NSQuoteAlternative thing;
Integer userValueOverride = thing.GetUserValueOverride();
GetVAT()
Introduced or updated in version: 7.5
Declaration
Float GetVAT()
Returns
Type | Description |
---|---|
Float | Tax/VAT, THIS IS AN AMOUNT, available as a merge field in the quote document. |
Remarks
The SuperOffice quote connector will calculate this field based on the vat PERCENTAGES on the individual lines; other connectors may implement other algorithms at will.
Examples
NSQuoteAlternative thing;
Float vAT = thing.GetVAT();
GetVATInfo()
Introduced or updated in version: 7.5
Declaration
String GetVATInfo()
Returns
Type | Description |
---|---|
String | Extra info about VAT that the connector might insert. |
Remarks
This field has no business logic in the CRM code, but is available as a merge field in the quote documents.
Examples
NSQuoteAlternative thing;
String vATInfo = thing.GetVATInfo();
SetDescription(String)
Introduced or updated in version: 7.5
Declaration
Void SetDescription(String description)
Parameters
Type | Name | Description |
---|---|---|
String | description | The tool-tip to use in the user interface (on the tab, for instance). |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
String description;
thing.SetDescription(description);
SetDiscountAmount(Float)
Introduced or updated in version: 7.5
Declaration
Void SetDiscountAmount(Float discountAmount)
Parameters
Type | Name | Description |
---|---|---|
Float | discountAmount | The discount the sales rep specifies, in whatever currency the sale is in. Both the two 'DiscountPercent' and 'DiscountAmount' shall be filled out, but the UserValueOverride field must be set to the field the user actually changed. |
Returns
Type | Description |
---|---|
Void |
Remarks
If this field is filled out by the user, it overrides the discount suggested by the connector. If the user has not filled any values, the system will copy the ERP discount amount value into this field.
Examples
NSQuoteAlternative thing;
Float discountAmount;
thing.SetDiscountAmount(discountAmount);
SetDiscountPercent(Float)
Introduced or updated in version: 7.5
Declaration
Void SetDiscountPercent(Float discountPercent)
Parameters
Type | Name | Description |
---|---|---|
Float | discountPercent | The discount the sales rep specifies, in percent. The Percentage is given in integer form, i.e. '12%' is represented as '12'. Both the two 'DiscountPercent' and 'DiscountAmount' shall be filled out, but the UserValueOverride field must be set to the field the user actually changed. |
Returns
Type | Description |
---|---|
Void |
Remarks
If this field is filled out by the user, it overrides the discount suggested by the connector. If the user has not filled any values, the system will copy the ERP discount percent value into this field.
Examples
NSQuoteAlternative thing;
Float discountPercent;
thing.SetDiscountPercent(discountPercent);
SetEarningAmount(Float)
Introduced or updated in version: 7.5
Declaration
Void SetEarningAmount(Float earningAmount)
Parameters
Type | Name | Description |
---|---|---|
Float | earningAmount | Earning on this alternative, as an absolute amount. |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
Float earningAmount;
thing.SetEarningAmount(earningAmount);
SetEarningPercent(Float)
Introduced or updated in version: 7.5
Declaration
Void SetEarningPercent(Float earningPercent)
Parameters
Type | Name | Description |
---|---|---|
Float | earningPercent | The earning on this alternative, in percent of total. The Percentage is given in integer form, i.e. '12%' is represented as '12'. |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
Float earningPercent;
thing.SetEarningPercent(earningPercent);
SetERPDiscountAmount(Float)
Introduced or updated in version: 7.5
Declaration
Void SetERPDiscountAmount(Float eRPDiscountAmount)
Parameters
Type | Name | Description |
---|---|---|
Float | eRPDiscountAmount | The discount the system calculates based on customer /amount / whatever. |
Returns
Type | Description |
---|---|
Void |
Remarks
Can be overridden by the user in the field 'DiscountPercent' or 'DiscountAmount'. Both the two 'ERPDiscountPercent' and 'ERPDiscountAmount' shall be filled out. If UserValueOverride is 'None', then the ERPDiscountAmount shall be copied into DiscountAmount and ERPDiscountPercent into DiscountPercent.
Examples
NSQuoteAlternative thing;
Float eRPDiscountAmount;
thing.SetERPDiscountAmount(eRPDiscountAmount);
SetERPDiscountPercent(Float)
Introduced or updated in version: 7.5
Declaration
Void SetERPDiscountPercent(Float eRPDiscountPercent)
Parameters
Type | Name | Description |
---|---|---|
Float | eRPDiscountPercent | The discount the system calculates based on customer /amount / whatever. The Percentage is given in integer form, i.e. '12%' is represented as '12'. |
Returns
Type | Description |
---|---|
Void |
Remarks
Can be overridden by the sales rep in the field 'DiscountPercent' or 'DiscountAmount'. Both the two 'ERPDiscountPercent' and 'ERPDiscountAmount' shall be filled out. If UserValueOverride is 'None', then the ERPDiscountAmount shall be copied into DiscountAmount and ERPDiscountPercent into DiscountPercent.
Examples
NSQuoteAlternative thing;
Float eRPDiscountPercent;
thing.SetERPDiscountPercent(eRPDiscountPercent);
SetERPQuoteAlternativeKey(String)
Introduced or updated in version: 7.5
Declaration
Void SetERPQuoteAlternativeKey(String eRPQuoteAlternativeKey)
Parameters
Type | Name | Description |
---|---|---|
String | eRPQuoteAlternativeKey | Key that identifies this alternative in the ERP system, if it exists there. |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
String eRPQuoteAlternativeKey;
thing.SetERPQuoteAlternativeKey(eRPQuoteAlternativeKey);
SetExtraField1(String)
Introduced or updated in version: 7.5
Declaration
Void SetExtraField1(String extraField1)
Parameters
Type | Name | Description |
---|---|---|
String | extraField1 | Optional information added by Quote Connector; usable in the quote document merge process. |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
String extraField1;
thing.SetExtraField1(extraField1);
SetExtraField2(String)
Introduced or updated in version: 7.5
Declaration
Void SetExtraField2(String extraField2)
Parameters
Type | Name | Description |
---|---|---|
String | extraField2 | Optional information added by Quote Connector; usable in the quote document merge process. |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
String extraField2;
thing.SetExtraField2(extraField2);
SetExtraField3(String)
Introduced or updated in version: 7.5
Declaration
Void SetExtraField3(String extraField3)
Parameters
Type | Name | Description |
---|---|---|
String | extraField3 | Optional information added by Quote Connector; usable in the quote document merge process. |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
String extraField3;
thing.SetExtraField3(extraField3);
SetExtraField4(String)
Introduced or updated in version: 7.5
Declaration
Void SetExtraField4(String extraField4)
Parameters
Type | Name | Description |
---|---|---|
String | extraField4 | Optional information added by Quote Connector; usable in the quote document merge process. |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
String extraField4;
thing.SetExtraField4(extraField4);
SetExtraField5(String)
Introduced or updated in version: 7.5
Declaration
Void SetExtraField5(String extraField5)
Parameters
Type | Name | Description |
---|---|---|
String | extraField5 | Optional information added by Quote Connector; usable in the quote document merge process. |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
String extraField5;
thing.SetExtraField5(extraField5);
SetName(String)
Introduced or updated in version: 7.5
Declaration
Void SetName(String name)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name of Alternative. Shown in tab in user interface, intentionally kept short. |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
String name;
thing.SetName(name);
SetQuoteAlternativeId(Integer)
Introduced or updated in version: 7.5
Declaration
Void SetQuoteAlternativeId(Integer quoteAlternativeId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteAlternativeId | Primary key. |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
Integer quoteAlternativeId;
thing.SetQuoteAlternativeId(quoteAlternativeId);
SetQuoteVersionId(Integer)
Introduced or updated in version: 7.5
Declaration
Void SetQuoteVersionId(Integer quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Integer | quoteVersionId | The version that owns this alternative (the chain is Sale 1->1 Quote 1->+ QuoteVersion 1->+ QuoteAlternative. |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
Integer quoteVersionId;
thing.SetQuoteVersionId(quoteVersionId);
SetReason(String)
Introduced or updated in version: 7.5
Declaration
Void SetReason(String reason)
Parameters
Type | Name | Description |
---|---|---|
String | reason | If there was a problem, this field contains a localized explanation of the problem and possible steps to fix it that the user can be shown. |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
String reason;
thing.SetReason(reason);
SetStatus(Integer)
Introduced or updated in version: 7.5
Declaration
Void SetStatus(Integer status)
Parameters
Type | Name | Description |
---|---|---|
Integer | status | If there was a problem with for instance calculation, this field is set to warning or error. See QuoteStatus. |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
Integer status;
thing.SetStatus(status);
SetSubTotal(Float)
Introduced or updated in version: 7.5
Declaration
Void SetSubTotal(Float subTotal)
Parameters
Type | Name | Description |
---|---|---|
Float | subTotal | Value to help the user interface, is computed by summing the total price of the quote lines, and NOT by summing their subtotals. |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
Float subTotal;
thing.SetSubTotal(subTotal);
SetTotalPrice(Float)
Introduced or updated in version: 7.5
Declaration
Void SetTotalPrice(Float totalPrice)
Parameters
Type | Name | Description |
---|---|---|
Float | totalPrice | Sum of the QuoteLines.TotalPrice* AlternativeDiscount or QuoteLines.TotalCost + Earning based on what, if anything, the user has entered last. Shall be calculated by the connector. |
Returns
Type | Description |
---|---|
Void |
Examples
NSQuoteAlternative thing;
Float totalPrice;
thing.SetTotalPrice(totalPrice);
SetUserValueOverride(Integer)
Introduced or updated in version: 7.5
Declaration
Void SetUserValueOverride(Integer userValueOverride)
Parameters
Type | Name | Description |
---|---|---|
Integer | userValueOverride | Has the pre-calculated (from ERP) price information been overridden, and how. See ValueOverride. |
Returns
Type | Description |
---|---|
Void |
Remarks
If the user has filled out the discountpercentage field, then the UserValueOverride field is set to OverridePercent. (The DiscountAmount, EarningPercent, EarningAmount and TotalPrice fields are calculated based on the discountPercent.)
Examples
NSQuoteAlternative thing;
Integer userValueOverride;
thing.SetUserValueOverride(userValueOverride);
SetVAT(Float)
Introduced or updated in version: 7.5
Declaration
Void SetVAT(Float vAT)
Parameters
Type | Name | Description |
---|---|---|
Float | vAT | Tax/VAT* THIS IS AN AMOUNT, available as a merge field in the quote document. |
Returns
Type | Description |
---|---|
Void |
Remarks
The SuperOffice quote connector will calculate this field based on the vat PERCENTAGES on the individual lines; other connectors may implement other algorithms at will.
Examples
NSQuoteAlternative thing;
Float vAT;
thing.SetVAT(vAT);
SetVATInfo(String)
Introduced or updated in version: 7.5
Declaration
Void SetVATInfo(String vATInfo)
Parameters
Type | Name | Description |
---|---|---|
String | vATInfo | Extra info about VAT that the connector might insert. |
Returns
Type | Description |
---|---|
Void |
Remarks
This field has no business logic in the CRM code, but is available as a merge field in the quote documents.
Examples
NSQuoteAlternative thing;
String vATInfo;
thing.SetVATInfo(vATInfo);