Help reg BSFN

samantha_sana

Well Known Member
Hi all,
I am new to bsfn .Created a simple bsfn to Fetch address book 'alph' using 'an8' but the function is not working.Testing the same by attaching the bsfn in a report.
Build is successful.
im trying on demo 9
Please let me know if i hv to perform anything after building the bsfn

Generating Makefile: C:\JDEdwards\E910_1\DEMO\obj\CALLBSFN.mak
Makefile generated.

---------------- SafetyCheck Started ---------------
Building business functions.

Scanning C:\JDEdwards\E910_1\DEMO\include\B55GET.h...
************Scanning C:\JDEdwards\E910_1\DEMO\source\B55GET.c...CALLBSFN
************---------------------- Done ----------------------

2 Files Processed

0 Errors
0 Warnings

B55GET.c
Replacing B55GET.obj
jdertdll.c
Creating library C:\JDEdwards\E910_1\DEMO\lib32\CALLBSFN.lib and object C:\JDEdwards\E910_1\DEMO\lib32\CALLBSFN.exp
msvcrtd.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
Microsoft (R) Manifest Tool version 5.2.3790.2075
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

Adjusting DLL load addresses . . .


************Build Finished************

CALLBSFN.dll - 0 error(s), 1 warning(s): Built successfully.
Generating Makefile: C:\JDEdwards\E910_1\DEMO\obj\CALLBSFN.mak
Makefile generated.

---------------- SafetyCheck Started ---------------
Building business functions.

Scanning C:\JDEdwards\E910_1\DEMO\include\B55GET.h...
************Scanning C:\JDEdwards\E910_1\DEMO\source\B55GET.c...CALLBSFN
************---------------------- Done ----------------------

2 Files Processed

0 Errors
0 Warnings

B55GET.c
Replacing B55GET.obj
jdertdll.c
Creating library C:\JDEdwards\E910_1\DEMO\lib32\CALLBSFN.lib and object C:\JDEdwards\E910_1\DEMO\lib32\CALLBSFN.exp
msvcrtd.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
Microsoft (R) Manifest Tool version 5.2.3790.2075
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

Adjusting DLL load addresses . . .


************Build Finished************

CALLBSFN.dll - 0 error(s), 1 warning(s): Built successfully.
Generating Makefile: C:\JDEdwards\E910_1\DEMO\obj\CALLBSFN.mak
Makefile generated.

---------------- SafetyCheck Started ---------------
Building business functions.

Scanning C:\JDEdwards\E910_1\DEMO\include\B55GET.h...
************Scanning C:\JDEdwards\E910_1\DEMO\source\B55GET.c...CALLBSFN
************---------------------- Done ----------------------

2 Files Processed

0 Errors
0 Warnings

B55GET.c
Replacing B55GET.obj
jdertdll.c
Creating library C:\JDEdwards\E910_1\DEMO\lib32\CALLBSFN.lib and object C:\JDEdwards\E910_1\DEMO\lib32\CALLBSFN.exp
msvcrtd.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
Microsoft (R) Manifest Tool version 5.2.3790.2075
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

Adjusting DLL load addresses . . .


************Build Finished************

CALLBSFN.dll - 0 error(s), 1 warning(s): Built successfully.
Generating Makefile: C:\JDEdwards\E910_1\DEMO\obj\CALLBSFN.mak
Makefile generated.
---------------- SafetyCheck Started ---------------
Building business functions.
Scanning C:\JDEdwards\E910_1\DEMO\include\B55GET.h...
************Scanning C:\JDEdwards\E910_1\DEMO\source\B55GET.c...CALLBSFN
************---------------------- Done ----------------------
2 Files Processed
0 Errors
0 Warnings

B55GET.c
Replacing B55GET.obj
jdertdll.c
Creating library C:\JDEdwards\E910_1\DEMO\lib32\CALLBSFN.lib and object C:\JDEdwards\E910_1\DEMO\lib32\CALLBSFN.exp
msvcrtd.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
Microsoft (R) Manifest Tool version 5.2.3790.2075
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
Adjusting DLL load addresses . . .
************Build Finished************
CALLBSFN.dll - 0 error(s), 1 warning(s): Built successfully.
 
Last edited:
Not sure what you've done, but if you get an ALPH from an AN8, why didn't you use N0500160 - Get Alpha Name From Address Book
 
samantha_sana,

Can you please post the Event Rules for the function ?

The BV will be receiving AN8 (==>) and returning ALPH ( <== )

AND also as johndanter said, it is better to use standard BVs. But its very nice to learn BVs.
 
Johndanter,
Thanks for reply...i want to learn writing c bsfn tats the reason i did not use NO500160
Thanks
 
It would be difficult to understand what code you have in your bsfn unless posted so even if build is successful it might not work if not coded correctly. You can go thru the BSFN guide which has lot of information on how to structure function & use the APIs. Then you can try to understand simple standard function to get an idea of they are used and then write your own code.

Chan
 
I assume you are on a full release and not standalone or anything like that. I believe these are the warnings I get after I have taken a full build built on the deployment server.

Your warning is a link warning when linking all the .obj files (including your new BSFNs .obj file) into the DLL. In this case you are probably fine (you can ignore this warning). The warnings probably stem from the BSFN DLLs being compiled/linked on the deployment server as part of the build process with different compile/link flags than what busbuild is using locally when you build BSFNs.

There is probably a MUCH easier and quicker way to get rid of these annoying warnings - and if someone knows how please, enlighten me (probably fixing the compile on the deployment server...) - but this is what I do after taking a new full package in DV to get rid of these annoying warnings when building BSFNs locally. Be careful when you do this since, if not done correctly, you could possibly have to re-install.

1. Exit JDE
2. edit jde.ini and make sure TARGET=DEBUG
3. run [jde root]\system\bin32\busbuild.exe
--3a. select "build|build all"
--3b. make sure that "Generate Missing Source Report" and "Generate Source for NER & TER" are the ONLy options checked in the dialog.
--3c. click the build button at the bottom of the dialog (and go get yourself a cup of coffee).
--3d. when its finished, exit busbuild.exe
4. run [jde root]\system\bin32\busbuild.exe again
--4a. select "build|build all"
--4b. make sure that make sure that "Generate Missing Source Report" and "Clear Output Destination before Build" are the ONLy options checked in the dialog.
--4c. !!!!! IMPOTANT!!!! make sure that "Generate Source for NER & TER" is ***NOT*** checked - this is very important!!!!!! Never use "Generate Source for NER & TER" and "Clear Output Destination before Build" at the same time!!!!!
--4d. click the build button at the bottom of the dialog (and go get yourself a couple more cups of coffee or take your lunch break).
--4e. when its finished, exit busbuild.exe

Hopefully now you won't get the link warnings when you build your BSFNs.

Techincally speaking step 3 is not required as you should have all the NER/TER source files all ready. I just like to do it to make sure. And after taking a full build it has the added benefit of JIT'ing a bunch of stuff which I find annoying when I am running APPLs, UBEs, etc.

What this does is recompile all the C code and completely rebuild all the DLLs with the same compiler/link flags. The reason you have to select the "Clear Output Destination before Build" is because the comipiler flags used by busbuild will only recompile a BSFN if the .c file has a time stamp newer than it's corresponding .obj file - w/o this option the compile for most of the BSFNs would be skipped and you will still get the link warnings.
 
Can you share your code files? I can help you with it.

---
Nishant Sharma
 
Brian,
I have noticed it depends what mode you build your BSFN in on if you get that warning or not.
Performance, Debug etc.

Try it :)
 
Right, I think it is all related to whether or not the copiler/linker flags creates the obj/dll with the "hooks" for debug/symbol info. Regardless, when I build a BSFN from OMW after taking a full build package I get the annoying link warnings. I view warnings as errors and don't like to have to look at the actual warning to see whether or not I can ignore it. That is why after taking a full build package in DV I go through that little ritual to recompile all the C code to avoid the warnings when building from OMW, which is where I build BSFNs 99% of the time. I suspect we could change some things on the deployment server where the build is done so I don't have to do all that. But it's not too big of a deal to do my little post full package ritual so I have just left well enough alone and have not asked our CNC group to mess with the whole package build process - they have bigger fish to fry.
 
Back
Top