Hi guys,
We are sending out an automated email via the SMTP mail. In a codeunit I create the email with production Order details, Is it possible via a code unit to get the bookmark for a certain page? I'm currently trying to use recordref.
For example I have I have the following code:
recProductionOrder.RESET;
recProductionOrder.SETRANGE("No.", recProdOrderLine."Prod. Order No.");
recProductionOrder.SETRANGE("Standard Cost Status", recProductionOrder."Standard Cost Status"::"Awaiting Cost");
IF recProductionOrder.FINDFIRST THEN BEGIN
ProdOrderRef.OPEN(DATABASE::"Production Order");
ProdOrderRef.SETPOSITION(ProdOrderRef.GETPOSITION);
I am later trying to get the bookmark for the page I found using the FINDFIRST above by using (ProdOrderRef.RECORDID,0,10). I've found this doesn't retrieve the same value as when you go "Copy Link to this page".
My question is it possible to get the correct url for a page from within a codeunit, if so how, and if not what's the alternatives?
Thnaks - We are using Navision 2013
0
Answers
1. Use ur setrange on rec;
2. GETURL with parameters like
I thought u use 2013R2.
ProdOrderRef.OPEN(5405);
ProdOrderRef.GETTABLE(recProductionOrder);
ProdOrderRef.SETPOSITION(ProdOrderRef.GETPOSITION);
And then for bookmark use FORMAT(ProdOrderRef.RECORDID,0,10);