Skip to main content

#Snowfakery0 人正在讨论

In apex I’d do something like this:

User u = [SELECT Id FROM User WHERE Id = :UserInfo.getUserId()];

Is it possible to do this using Snowfakery? I couldn’t find anything in the docs about this, so it may be unsupported 🤷‍♂️

#CumulusCI #Snowfakery
1 个回答
0/9000

Is anyone aware of an Education Cloud sample data set that can be uploaded in to an EC trial org? I recall an effort in past SFDO sprints to develop sample data for EDA and NPSP.  Looking to get enough data across objects to assess some Ed Cloud scenarios.

4 条评论
  1. 2024年5月13日 13:10

    Some of the demo IDO that partners have access to (if you have a managed services contract they may be able to help you access one for 30 days) include slightly more complete sample data sets.

     

    If you want really complex or large data sets you might look at using #Snowfakery, which is a data generation tool provided by Salesforce. Unfortunately those of us who work on sample recipes haven't posted Education Cloud recipes yet.

0/9000

I am trying to generate demo data for Program Management Module using Snowfakery and cumulusCI. I am struggling to do it as there is no proper guide or tutorial to do it.  I have create the project as mentioned in Trailhead Module Data Management with CumulusCI.  I am also following the instruction mentioned in  https://github.com/SFDO-Community-Sprints/DataGenerationToolkit/blob/main/docs/PMMSampleinstruction.md

 

it is still confusing. Can someone please guide me to clear simple steps of generating data for PMM Using Snowfakery and cumulusCI

 

Thanks

#PMM #CumulusCI #Snowfakery

8 个回答
  1. 2024年2月12日 06:16

    FYI for anyone else who wants to import the sample data from the PMM module release:

     

    1. Install VS Code
    2. Install Salesforce extensions (expanded) in VS Code
    3. Install CCI
    4. Log into your org and ensure that your user profile has access to all Account record types
    5. Run the commands in VS Code terminal as follows

    cci org connect <YOUR ORG NICKNAME>

    cci org default <YOUR ORG NICKNAME>

    cci task run load_dataset

0/9000

We'd like to test out some changes to have NPSP create the next installment for recurring donations.

 

When I create a partial sandbox, I see red error messages in the LEX components that there are no active schedules or upcoming installments. Additionally, if I manually create/close a related Opportunity, the Next Donation Date field clears and no future opportunity is created even though NPSP settings are set to auto-create the next installment. Components work fine in production.

 

According to this documentation, there is a 'protected' object called "Recurring Donation Schedule" that I cannot see in the Object Manager or select in a sandbox template, and the 'Next Donation Date' help/description text suggests it's set based on this mystery object.

 

What is this secret 'protected object' and can I push it to a partial sandbox in a way that will let me use standard Recurring Donation behavior for existing records?

 

@Nicholas Rustigian

 

Is it possible to seed a partial sandbox with functioning Recurring Donations?

7 个回答
  1. 2023年8月18日 09:19

    Hi @Duncan McGovern

     

    I no longer work with the nonprofit team, and I'm on parental leave at the moment, but I can answer this one. 

     

    For partial data sandboxes, or potentially even a full copy sandbox that is created using a sandbox template, Recurring Donation Schedule records are not created as part of the sandbox data seeding. This is a platform limitation with protected custom objects that is documented here (see the section at the bottom of the page): https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/packaging_protected_components.htm

     

    This is why the LWC components indicate there is no schedule, because there are no schedule records. 

     

    Yes as the custom object is protected, you will not be able to see evidence of it within an org with NPSP installed (similar to protected Custom Settings etc). The only place you will see RD Schedules is in Storage Usage, or using the Data Export utility (though this is potentially a platform bug), however as you noted there are API's to access the data itself if needed.

     

    For reference, here's the object in GitHub: https://github.com/SalesforceFoundation/NPSP/tree/main/force-app/main/default/objects/RecurringDonationSchedule__c

     

    Personally, for this use case I would recommend using Snowfakery to seed RD and related data in a partial sandbox as once you have a template defined it can quickly populate seed data and is easily portable. 

     

    If you want to use the existing RD records that are seeded into the partial data sandbox during sandbox creation or refresh, then simply editing a schedule-impacting field on the RD records should trigger the creation of a new schedule i.e 

    - Effective Date

    - Amount

    - Installment Period

    - Day of Month

    - Installment Frequency

    - Payment Method

    - Status (in certain circumstances)

    - Campaign

     

     I've not tested this but I believe it should work. 

0/9000

Do you struggle to create fake data for testing #Salesforce customizations or during product development? You’re not alone! 🤯 

 Register now for a beginner training session Apr 6th 9am PT / 12pm ET to learn how the @CumulusCI (CCI) #Snowfakery tool can help you create reliable ways to test your work and prevent problems.   

 

Snowfakery is a free and open source tool for generating fake Salesforce data that has relations between tables. Every row is made up of fake data, but also unique and random, like a snowflake. ❄️   

 

In this beginner training session hosted by the Salesforce.org Open Source Commons program, community volunteer @Junette Tan will highlight Snowfakery basics and share how you can generate incredibly customizable fake data, including how to write and customize a recipe file in YAML.  

 

Everyone is welcome to attend and no prior experience is needed. Please consider sharing with your network or send a personal invitation to someone you think might benefit from this learning.

 

Register today!

 

@Salesforce.org MVPs

@Salesforce.org Nonprofit Events

@Education Events

@Salesforce.org System Administrators

@* Salesforce Developers *

@Commons Project: Data Generation

16 条评论
0/9000

We are so thrilled to share this new episode on the Salesforce Developer Podcast featuring @Aaron Crosman and all things #Snowfakery & Data Gen!  Give it a listen and leave Aaron some kudos in this thread!

https://developer.salesforce.com/podcast/2022/04/episode-119-open-source-and-data-generation-with-aaron-crosman

5 条评论
0/9000

I've been on a long journey with some amazing community members to learn #Snowfakery and how to get my bearings with developer tools.  #Admineloper , anyone?  Here's my latest piece on getting started with Snowfakery and Data Generation.  If I can do it, I know you can do it!  https://thedataarealright.blog/2022/02/14/snowfakery-progress/

 

#Salesforce Developer

1 条评论
0/9000

I have created a permission set with 'Set Audit Fields upon Record Creation' and assigned to my user.

 

In my snowfakery recipe I have: 

 

- object: Opportunity

fields:

...

CreatedDate:

date_between:

start_date: 2021-01-01

end_date: today

 

When I run the recipe I get:

[11/16/21 14:52:25] Field Opportunity.CreatedDate is not present or does not have the correct permissions.

Error: One or more schema or permissions errors blocked the operation.

If you would like to attempt the load regardless, you can specify '-o drop_missing_schema True' on the command.

 

How can I set the CreatedDate on an opportunity with snowfakery?

 

The cci documentation says:

 

"... If orgs are configured to permit setting audit fields upon record creation and the appropriate 

user permission is enabled, CumulusCI can apply relative dating to audit fields, such as CreatedDate...."

 

So I am hoping snowfakery can also set audit fields

 

#Snowfakery

1 个回答
  1. 2021年11月16日 22:47

    @Mark Irvine I tested and this worked for me. Are you sure the permission set is assigned to the same user you connected to CumulusCI?

0/9000

⛄ Storytime!! ❄️ (whoops sorry for the duplicate post! i was logged in under the wrong user!)

 

Yesterday I was doing a product demo of #Skuid​ with a colleague/friend/general badass and they were generous enough to screenshare in their org's sandbox. I learned soooooooooo much! And, like many of us have experienced, there were some nodes of data that we couldn't see *simply because there were no records in the SB* to render in the UI. Le sigh!

 

All I could think about (besides, y'know, all the things Skuid can do that Flow/LEX record pages etc cannot do) was how awesome it would be to whip up a #Snowfakery​ recipe to seed this sandbox with realistic-but-not-real data. I don't think I could have imagined such an endeavor a year ago (although Snowfakery DID exist a year ago...)! A year from now, hopefully I'll be banging out those recipes 🙂

 

So grateful to this group and all that we have accomplished with raising the standard and feasibility for reliable test data without compromising scale or privacy.

 

PS @Amy Guterman (salesforce.com)​ - one of many impact stories from the Commons ecosystem 🙂

0/9000

Attention Europe, Middle East, and Africa (EMEA) Community!

 

The OSC and SFDO Release Engineering have partnered yet again to host another #Snowfakery training session, this time on August 24th, 10am CET! Snowfakery, one of the CumulusCI Suite of tools, was designed to help organizations generate extremely customizable fake data that has relations between tables. Every row is faked data, but also unique and random, like a snowflake.

 

Learn from @Myrthe Moring, a Salesforce Technical Consultant based in Amsterdam who focuses on AI and Einstein. Get an overview of the tool, a demo of the YAML recipe file, and more! Everyone is welcome to attend and no prior experience is needed.

 

Register today!

Attention Europe, Middle East, and Africa (EMEA) Community! The OSC and SFDO Release Engineering have partnered yet again to host another training session, this time on August 24th, 10am CET! Snowfake

 

@CumulusCI (CCI)

2 条评论
0/9000