Showing results for 
Search instead for 
Did you mean: 

Set mandatory vendor spec attribute to toggle between true or false through script

0 Kudos

Hello Experts,

Here is a representation of a document -

RFX -- Line Items

Line Item 1 --> Vendor Spec Group -- > Spec 1 -- > Part Price for year (Attribute)

On an RFX document, I have an vendor spec attribute(Part price for year) that is created through script under each Line Item. while creation, this attribute is set mandatory.

On the Rfx response page on sell side, The vendor enters Price value through this attribute or through scales.

I have to place a condition if the vendor enters price value using scales this attribute Part Price for year must be set as non required field.

I tried the following code to set the spec attribute to false in the Rfx Response class script but it is not working.

rfxResponseBo = ((RfxResponseDocBo)doc.getReferenceBo()); // get Response Reference object
ItemSpecGroupBo supplierGroup = (ItemSpecGroupBo)doc.getReferenceBo().getLineItemResponseList().getVendorSpecGroup().get(0); // Get Line Item's vendor spec group
((ItemSpecBo)supplierGroup.getItemSpecs()).get(0).set(Boolean.FALSE); //Get Item Spec and its attribute and set required false
rfxResponseBo.getLocalHome().save(rfxResponseBo); // save the response object.

If you have any idea to set this attribute to false, Please suggest. or if u have a code snippet to set mandatory Spec attribute to toggle between true and false. please advise.



Accepted Solutions (0)

Answers (0)