Today I was asked to allow the users to copy a quote when its status is Sent or Lost.
To copy a quote go to Sales Quotation Details, choose a record and then go to the header level buttons and click Function > CopyFromAll
The following are the steps to accomplish this very quick:
1- Go to the SalesQuotationTable Form > Designs > Design GroupTable> ButtonGroup:ButtonHeader> MenuButton:ButtonHeaderFunction>method>clicked:
You will see the following code:
void clicked()
{
;
// Set price simulation buttons
salesQuotationPriceSimHeader.enabled(!salesQuotationTable.isTemplate());
salesQuotationTableForm.enableFunctionButtons(salesQuotationTable,
buttonConvert2Customer,
buttonAlternativeQuotations,
buttonCopyAllHeader,
salesQuotationChangeReasonCode);
smmDocuments.enabled(!salesQuotationTable.isTemplate());
super();
}
2- Go to the definition of enableFunctionButtons method (right click > Go To Definition.
Look for the following line of code:
enableCopyAllHeaderButton = salesQuotationTableType.mayQuotationBeCopied();
ok = (//salesQuotationTable.QuotationStatus != SalesQuotationStatus::Sent &&
salesQuotationTable.QuotationStatus != SalesQuotationStatus::Confirmed &&
//salesQuotationTable.QuotationStatus != SalesQuotationStatus::Lost &&
salesQuotationTable.QuotationStatus != SalesQuotationStatus::Cancelled);
Comment the lines in green.
No comments:
Post a Comment
Thank you for your thoughts. Your comment will appear in my blog shortly after review.
Have a great day!