Price populate Issue

souravbsouravb Member Posts: 135

Hi,
i have crearted a menu item, "get job price" in Purchase Quote under Line. It calculates the total price of a job from Job Budget Line and would populate the amount in the "Direct unit cost" field in Purchase Quote line. I am able to calculate price, but unable to populate it in the Purchase Quote line. I have created a process only report to do this with the code:


//CALCULATE TOTAL PRICE FOR A JOB
TotalPrice:=0.0;
GVJobBudgetLine.SETRANGE(GVJobBudgetLine."Job No.",GVJobNo);
IF GVJobBudgetLine.FIND('-') THEN
REPEAT
TotalPrice:=TotalPrice+GVJobBudgetLine."Unit Price";
UNTIL(GVJobBudgetLine.NEXT=0);
//CALCULATE TOTAL PRICE FOR A JOB

GVJobBudgetLine = Record of Job Budget Line.

Plz help

Comments

  • kinekine Member Posts: 12,562
    Ok, this is the part for calculating the price, but where you have some code which will store the result into the quote line? (you know, the two line which will assign the value into the field (or validation instead just assign) and for modifying the record in db...)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.