• AdamH
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies

Updated:

 

Hi all,

 

I'm trying to add a custom field to my QuoteLineItem object that will look up a discount value in a custom object (Discounts) per discount code and per product category. My Discounts object is like this:

 

Discount Code, Product Category, Discount Percent

AB01, CAT, 30

AB01, EPI, 20

AB02, CAT, 15

AB02, EPI, 25

etc......

 

My Accounts object has a custom field 'Discount Code' that matches the 'Discount Code' value in my Discounts object. So, account 'Acme Inc' may have a Dicount Code = 'AB01'.

My Products object has a custom field 'Product Category' that matches one of the Prodcut Category field values. So Product A could have a Product Category = 'EPI'.

 

What I want to do is create a custom field in QuoteLineItem that will return the Discount Percent for matching Discount Code > Product Category for the account that's being quoted.

 

This is probably simple, I'm just a noob.

 

Thanks in advance.

  • September 23, 2013
  • Like
  • 0

I'm sure there is a simple answer to this, but I can't seem to find it. Is there not a method available to return an index position of a list item? I want to do something like this:

 

myList.remove(myList.indexOf('Some Value'));

 Is my only option to loop through myList comparing each element as I go?

  • July 12, 2013
  • Like
  • 0

Updated:

 

Hi all,

 

I'm trying to add a custom field to my QuoteLineItem object that will look up a discount value in a custom object (Discounts) per discount code and per product category. My Discounts object is like this:

 

Discount Code, Product Category, Discount Percent

AB01, CAT, 30

AB01, EPI, 20

AB02, CAT, 15

AB02, EPI, 25

etc......

 

My Accounts object has a custom field 'Discount Code' that matches the 'Discount Code' value in my Discounts object. So, account 'Acme Inc' may have a Dicount Code = 'AB01'.

My Products object has a custom field 'Product Category' that matches one of the Prodcut Category field values. So Product A could have a Product Category = 'EPI'.

 

What I want to do is create a custom field in QuoteLineItem that will return the Discount Percent for matching Discount Code > Product Category for the account that's being quoted.

 

This is probably simple, I'm just a noob.

 

Thanks in advance.

  • September 23, 2013
  • Like
  • 0

I'm sure there is a simple answer to this, but I can't seem to find it. Is there not a method available to return an index position of a list item? I want to do something like this:

 

myList.remove(myList.indexOf('Some Value'));

 Is my only option to loop through myList comparing each element as I go?

  • July 12, 2013
  • Like
  • 0