HI All,
I am new to this forum.
Though I tried to search for my topic, but didn't quite understand the solutions proposed - probably due to my limited experience with Navision 3.7.
I have a Boolean field in my Sales Line table that I would like to bring into my Purchase Line table using flowfield.
I am establishing (or trying using calcformula) the link between Purchase Line and Sales line via Line No. field that gets copied to the Purchase Line table for every line.
I would also like to be able to modify the boolean field from the Purchase side. (Is it even possible with flow fields?)
How can I do this? I 've tried using Lookup and Exist function but no luck.
0
Comments
What is it you need? It sounds more like a c/al function geting information from the salesline and retruning some information when the value is changed on the purchase order.
PS: Welcome here and enjoy
Especially just linking Line No. fields.
It almost sounds like you want a check mark on a po item if a sales order exists or something??
Can you clarify.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Rgds,
Johnson
"Camino Palmero"
sea-navision-community-subscribe@yahoogroups.com
detail in:
http://sea-navision-community.blogspot.com
I gave up on flowfield. I am trying with C/AL.
I added a new Text Control to my PO line sub form, and assigned a new
Boolean variable to it.
I am able to retrieve the Boolean value and display it in the new Text Control called p_checked.
The field is editable, so when the users change/check it in the PO form, I would like to be able to update the sales line field s_checked accordingly. I am using the following code under the OnValidate trigger of the p_checked control:
SalesLine.RESET;
SalesLine.SETRANGE("Line No.","Special Order Sales Line No.");
IF SalesLine.FIND('-') THEN BEGIN
SalesLine."s_checked" := Testing;
END
The field s_checked in sales line table doesn't get updated.
I then included the following line to the above code
CurrForm.UPDATE(TRUE);
But it caused error "CurrForm.UPDATE method can not be called from here.
How would I update this field?
Did u miss the line where i said i am new to this????
I wasn't born with "navision talent" unlike you I guess. I have to learn this thing, unfortunately.
Testing isn't the variable i am using in actual code. Changed it, for a reason, in the posting.
For the rest, thanks for your help guys! I have figured this one out. But I am sure I'll be back on others.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Easy my friend. You were once new to Navision as well.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
__
Under OnAfterGetRecord event of PO Line form, I used the following code to retrieve the field from Sales Line Table:
SalesLine.RESET;
SalesLine.SETRANGE("Document Type","Document Type"::Order);
SalesLine.SETRANGE("Document No.","Special Order Sales No.");
SalesLine.SETRANGE("Line No.","Special Order Sales Line No.");
IF SalesLine.FIND('-') THEN
PriceApproved := SalesLine."Price Approved";
To write the updated value back to the Sales Line Table:
I used the following code under the OnPush event of the control:
SalesLine.RESET;
SalesLine.SETRANGE("Document Type","Document Type"::Order);
SalesLine.SETRANGE("Document No.","Special Order Sales No.");
SalesLine.SETRANGE("Line No.","Special Order Sales Line No.");
IF SalesLine.FIND('-') THEN BEGIN
SalesLine."Price Approved" := PriceApproved;
SalesLine.MODIFY;
END
__
Now sparky, feel free to suggest improvent, but spare me the russion wisdom.
Same with the next piece of code, don't set filters and FIND, use GET with
the primary key values instead.
RIS Plus, LLC
=D> =D> =D> ...me too
..... like e.g. read your f**** notes. yes, you're right...
...no more words...
RIS Plus, LLC