cancel
Showing results for 
Search instead for 
Did you mean: 

How to add new record or fetch existing record from database...???

Former Member
0 Kudos

Hi,,,, Everyone....

I need your help.....

I just created one form in Visual Studio  and then run into SAP B1.... Based On that how i can fetch existing record or insert new record from database???

I attach form image which i created in VS2010.

Plz.. Help..

Thanks & Regards..

Nikunj...

Accepted Solutions (1)

Accepted Solutions (1)

edy_simon
Active Contributor
0 Kudos

Hi Nikunj,

The custom form should show you whatever in the database.

If your record in the database does not contains anything it should not have anything also on the screen.

Your UDF field on System screen should show you nothing also.

Did you attach a formatted search on these UDFs ?

Or is there any addon running that is calculating these fields each time the form data is loaded ?

Regards

Edy

Former Member
0 Kudos

Hi Edy,

ya as u mentioned, there is a FMS running on the UDF with which we get the Result into the fields.

now the scenario is, we need to use these results to be displayed at another page that is created using B1 studio. kindly help what can we do in this scenario... ?

thanks

Nikunj.

edy_simon
Active Contributor
0 Kudos

Hi Bikin,

As mentioned before. The form will show you whatever data is in the table.

FMS, is only a screen calculation. So, unless you commit this FMS data to table, you cannot use it elsewhere.

2 solutions :

1. Open this doc number 3, change something on the form to make it in update mode. Click on the update button. Once successful, do the query and make sure it is committed in the table. Value should show automatically on your form.

2, attach another FMS that do the same calculation to your form.

Regards

Edy

Former Member
0 Kudos

Hi Edy..

I got it..

But it is very tough job to process bcoz whenever i create new SO and then add & make changes and update then it will store UDF values...

is there another way to make it easy?

Thanks...

edy_simon
Active Contributor
0 Kudos

Hi Nikunj,

Set the FMS to auto update on change of doc total.

This way, the first time you  add the order, the udf is already updated.

Regards

Edy

Former Member
0 Kudos

Hi Edy,

I try it but it will not calculate total quantity on my UDF while i add number of quantity in SO.

I set FMS to auto update on change of DocTotal as well as set Refresh Regularly.

Thanks.

Former Member
0 Kudos

Hi Edy,

Basically What is the use of Pick & Pack manager?

Bcoz i want to create one type of loading sheet which generated all Invoices Total Quantity as well as Total Weight , whether it is possible to create in it?

Plz.. give me some basic idea about on it...

Thanks.

Nikunj

edy_simon
Active Contributor
0 Kudos

Hi Nikunj,

Can you post your FMS here ?

Regards

Edy

edy_simon
Active Contributor
0 Kudos

Hi Nikunj,

This question is already not related to your original post.

Please post this in a new thread, and you better post in the SAP Bussiness One application forum.

They are more expert in answering this question.

Regards

Edy

Former Member
0 Kudos

Hi Edy,

I got all solution on my problem.

Thanks to very much for better help.

Thanks.

Former Member
0 Kudos

Hi Edy,

My another question is that what is basically use of Pick & Pack manager???

Some basic idea about on it..

Thanks.

edy_simon
Active Contributor
0 Kudos

Hi Nikunj,

Please post the question re Pick n Pack in the SAP Business One Application forum.

You should get better help there.

Meanwhile, please close this thread, as you have already got the answered.


Regards

Edy

Former Member
0 Kudos

Hi Edy

this is Dhananjay i need your help can you tell me how to used SAP B1 studio  and where i will write

C# code for particular field (like as matrix) .if you have document link or SAP B1 studio videos link plz  mail me . on my email id is dhananjay@dynamoerp.com,dhananjay.hiet@gmail.com

Thanks!

Dhananjay. 

Answers (1)

Answers (1)

edy_simon
Active Contributor
0 Kudos

Hi Nikunj,

This will depends on what object are you basing for your form.

I will try to guide you step by step :

first, what is the object that you want to retrieve from your database ?

1. UDT ? (user table without registering for UDO)

2. UDO ? (user tables registered as UDO)

3. System Object ? ( such as OINV, ORDR etc)

Regards

Edy

Former Member
0 Kudos

Hi,,,Edy

I want to fetch record from System Object like OQUT,ORDR,ODLN,OINV.....and then show in my form which i created in VS2010.....  i fetch record from SAP B1.

Now i attach UDO Form which i created....

edy_simon
Active Contributor
0 Kudos

Hi Nikunj,

I will answer your first : System Object. I will take ORDR as an Example

In your form designer (B1Studio),

1.     Add 2 label and 2 Edit Text

    

2.   Set the property for the first Edit Text :

   

3.    And the 2nd EditText property  :

     Alias  = NumAtCard, DataSource = ORDR

     You can put anything under UniqueID

4.    Add a DBDataSource to your Form. Set the TableName property to ORDR

5. Set your Form Property to  :

6. Now Click on the preview button on your B1Studio toolbar menu.

The form should open in your SAP Business One Client.

You can click on the Record Navigation Button and browse to the Order Tables.

You can also update the Customer Ref field from this form.

Regards

Edy

Former Member
0 Kudos

Hi,,, Egy

I follow all yours step but when i click on preview button then it will display error...

I try all but get error...   i attach error like this.......

Former Member
0 Kudos

Hi Nikunj


This can haapen if your DI API uses a different License Server than the B1 application.


Compare the License Server settings in both b1-local-machines.xml files. TheB1 application is under C:\program files (x86)\SAP\Sap Business One\Conf and the other is under C:\program files (x86)\SAP\Sap DI API\Conf.


Note that the path C:\program files (x86) can be different in your computer.



Thanks,

Amit

Former Member
0 Kudos

Hi Nikunj

Please refer below link:

http://stackoverflow.com/questions/12426559/rpc-e-serverfault

http://scn.sap.com/thread/1557839

I hope This Help You

Thanks

Amit

Former Member
0 Kudos

Thanks Amit your answer will helpful but i get also error................

Former Member
0 Kudos

Hi....Edy

Your answer is very helpful to me....

Thanks....

But i need one help is that i created UDF in ORDR and those filled data i want to see in my form which i created but it not display........

Without UDF data it will display but i see those data which i see in my UDF....

Just see image.......

In below image i see DocNum but not see total Quantity..........

edy_simon
Active Contributor
0 Kudos

Hi Nikunj,

It should work the same way.

Just make sure that it is bind to the correct UDF.

Regards,

Edy

Former Member
0 Kudos

Hi Edy...

I created UDF in Marketing Document and set Link to UDO and call to this UDF in every document like ORDR, etc.

but whenever i fetch UDF value in my B1 Studio form it will display 0 or 1 value in...but if i want to navigate record in my ORDR then it display value but not to call in B1 Studio form...

I set all properties.

I attach image.

Regards,

Nikunj

edy_simon
Active Contributor
0 Kudos

Hi Nikunj,

If you run a query to this ORDR Table,

SELECT * FROM ORDR WHERE DocEntry = 3.

What is the value of your UDFs in the result ?

Regards

Edy

Former Member
0 Kudos

Hi Edy,

Its show me following result.

It display name,etc. but not display TotalQuantity,TotalWeight,etc. data. which i created as UDF.

Former Member
0 Kudos

Hi Nikunj

this is Dhananjay i need your help can you tell me how to used SAP B1 studio  and where i will write

C# code for particular field (like as matrix) .if you have document link or SAP B1 studio videos link plz  mail me . on my email id is dhananjay@dynamoerp.com,dhananjay.hiet@gmail.com

Thanks!

Dhananjay.