Need help with fixtures

Hi Guys ,

Greetings for the day . I have few custom scripts running for my custom apps , I am planning to integrate inside my app , at present these scripts are in custom script interface in erp I mean in db . I tried creating a folder under

my_app/fixtures/custom_script, and in this folder added my custom scripts like:


But this is not working . Could someone guide me with this ?

Thanks in advance

@ragav Have a look at:

You need to add “Custom Script” to fixtures

1 Like

In file

fixtures = [“Custom Script”]

1 Like

Many thanks for the reply @JoEz and @Hafees_Kazhunkil .

I put my custom script in


and included this in file

# app_include_js = "/home/ommi/frappe-bench/apps/product_master/product_master/fixtures/prod_master.js"

but still my scripts does not work , please guide me .

Thanks in advance

I suggest again to read and pay attention on:

You need only to add

fixture = ["Custom Script"]

in of your app

1 Like

Thanks a bunch for the help @JoEz , I added fixture = ["Custom Script"] and ran bench export fixtures command , a folder got created inside my app , that is fixtures and where I was able to find a json file , after this I started the bench , but the script works only if I have my scripts in custom script location , I thought the scripts for the app will work with the json file that got created automatically . Will this script get installed automatically when I install this app in a new site ?

Please advise
Thanks .

Yes, it will get installed when u install urtis custom app to a new site

1 Like

Thanks a lot @JoEz .