Blob

njaikunjaiku Member Posts: 116
edited 2007-08-08 in Navision Financials
Suppose if i have a form A with the field BLOB (having the picture).
If i want to get the same data from the Form A to the form B including the BLOB field. Is it possible. Can anyone give me the solution?
Jai

Comments

  • jlandeenjlandeen Member Posts: 524
    This is a fairly simple & straighforward task and you can use the copystream function (look it up in online help for more details).

    Here's some pseudocode that should help you out. (Note that i may have the order incorrect on the copystream function as I don't remember the syntax off the top of my head)
    RecordA.calcfields(BLOBField);
    RecordA.BLOBField.createoutstream(outsreamVar);
    RecordB.BLOBField.createinstream(instreamVar);
    copystream(outstreamVar,instreamVar);
    RecordB.modify;
    

    Thats how I have been able to get BLOB datamoved around. Should you not have a BLOB field on a record you can always use an instance of the TempBlob table (Table99008535) to work with BLOBs and streams.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • njaikunjaiku Member Posts: 116
    Thank you very much for this solution. I have a doubt whether i need to place these coding in Form A or Form B

    Whether i need to place these codings in the table level.

    Can u able to help me out ?
    Jai
  • jlandeenjlandeen Member Posts: 524
    I would think it would be easiest to place this kind of logic at the table layer. I try to keep forms as "dumb" as possible, and place any logic into a table or codeunit. As you cannot view all of the code in a form (i.e. you an only see the OnClick/OnActivate/OnPush, etc. triggers of the active element) if code is on forms it can be harded to find and fix at a later point.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
Sign In or Register to comment.