12. Mai 2014 13:04
12. Mai 2014 13:18
12. Mai 2014 15:57
RecRef.Open(50010);
FldRef := RecRef.FIELD(1);
FldRef.SETRANGE('3256');
RecRef.FINDLAST;
Recordlink."Record ID":= RecRef.RECORDID;
Recordlink.Type:=1;
Recordlink."User ID":=USERID;
Recordlink.Company:=COMPANYNAME;
Recordlink.Created:=CREATEDATETIME(WORKDATE,TIME);
Recordlink.Description:= Description; //TEXT 250
Recordlink.INSERT;
12. Mai 2014 16:27
12. Mai 2014 16:35
25. Mai 2014 21:46
25. Mai 2014 22:00
Fido hat geschrieben:Hast du da in deinem Code nicht das Feld "LINK ID" (Primärschlüssel) vergessen?
The AutoIncrement property is designed to always assign numbers automatically. If you want to insert a record, be sure that the value in this field is blank before you insert the record.
25. Mai 2014 22:06
26. Mai 2014 18:17
cr := 13;
URL := GETURL(CLIENTTYPE::Current,COMPANYNAME, OBJECTTYPE::Page, PageNo,HelpDeskHeader);
LinkId := HelpDeskHeader.ADDLINK(URL ,STRSUBSTNO('%1 - %2 - %3',HelpDeskHeader.TABLECAPTION,HelpDeskHeader."No.",HelpDeskHeader.Name));
RecordLink.GET(LinkId);
RecordLink.Type := 1;
RecordLink."To User ID" := HelpDeskHeader."Editor Person";
RecordLink.Note.CREATEOUTSTREAM(NavOutStream);
TextStr := STRSUBSTNO(Text002,HelpDeskHeader."No.",FORMAT(TODAY),FORMAT(TIME)) +
FORMAT(cr)+ STRSUBSTNO(Text004,HelpDeskHeader.Status +
FORMAT(cr)+ STRSUBSTNO('%1: %2',HelpDeskHeader.FIELDCAPTION("Short Info"),HelpDeskHeader."Short Info"));
Encoding := Encoding.UTF8;
BinaryWriter := BinaryWriter.BinaryWriter(NavOutStream,Encoding);
BinaryWriter.Write(TextStr);
RecordLink.Notify := TRUE;
RecordLink.MODIFY;
27. Mai 2014 17:51
Fido hat geschrieben:Klappt eigentlich ganz gut, nur die USERID wird um die Domäne gekürzt. Warum ? K.P.
27. Mai 2014 17:55