Hi all .
I need to solve the below,
My request is : Mandatory Attachment to RFQ.
Path: Procurement and Sourcing>Purchase Requisitions> all Purchase Requisitions
Requirement :Upon accepting a vendor quotation, the system must check if Bid attachment exist. If yes, user can accept quotation.
Otherwise, the system should notify the user that there is no attachment on vendor replies. User then will go to manage reply, edit RFQ reply for this vendor and add the bid attachment.
I want on the Accept button into the form : PurchRFQCompare , as the sc below :
![]()
when the user choose a vendor , they need to fill the attachment , so he can press the button aacept.
Only the vendor chosen they have to fill the build
what we should edit in the code to get this result.
The code:
[Extensionof(classstr(PurchRFQFormLetter))]
final class PurchRFQ_Extension
{
protected static void validatePurchRFQFormLetter(Args _args)
{
PurchRFQCaseTable rfqCaseTable;
PurchRFQTable rfqTable;
PurchRFQReplyTable rfqReplyTable;
PurchRFQUpdateType parmEnum;
DocuRef docuRef;
boolean hasAttachment = false;
next validatePurchRFQFormLetter(_args);
rfqCaseTable = _args.record();
while select rfqReplyTable
join rfqTable
where rfqReplyTable.RFQId == rfqTable.RFQId &&
rfqTable.RFQCaseId == rfqTable.RFQCaseId
{
select firstOnly docuRef
where docuRef.RefRecId == rfqReplyTable.RecId &&
docuRef.RefTableId == rfqReplyTable.TableId;
if (!docuRef)
{
hasAttachment = false;
break;
}
else
{
hasAttachment = true;
}
}
if (!hasAttachment)
{
throw error ("Bid attachments must be present.");
}
}
}
I need to add to the code , the condition like the sc above , when the user select one of these vendors , if he has a bid attachement hon the Accept button he can send the quotation , otherwise an error appear that he have to fill the bid.
Thank you.