Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Howdy Drupaler,
Right, the module is working great... a rule is creating the file perfectly.. but how do I then get the fid of the file to 'set a data value' of a filefield to add the file to a node in Rules.
Answers on a postcard...
Comment | File | Size | Author |
---|---|---|---|
#1 | commerce-invoice-pdf-rule-condition-to-scope.JPG | 48.06 KB | silkogelman |
Comments
Comment #1
silkogelman CreditAttribution: silkogelman commentedI'm trying to accomplish this too (not succeeding very well yet)
My usecase is:
After a Drupal Commerce order is completed a PDF invoice is generated and that PDF should be inserted into a private file field so only the order owner can view the PDF invoice file.
Not sure if you're doing this yet, but the first step is to bring the field you want to write the file to into scope:
go to Rule - Conditions Section
Add a condition of type "Entity has field"
target the "base" entity type that is in scope.
For my case I added a file field to the order first, and to bring it into scope I did as you can see on the attached screenshot.
Comment #2
lsolesen CreditAttribution: lsolesen commentedMarked #1654972: Putting the PDF into a filefield automatically as duplicate
Comment #3
Simon Georges CreditAttribution: Simon Georges commentedDoes http://groups.drupal.org/node/59713 help?
Comment #4
killua99 CreditAttribution: killua99 commentedDear fellow Drupal enthusiasts,
I have set this issue to "Postponed (Maintainer needs more information)".
If not already done please add an issue summary and steps how to reproduce the problem.
And please read again, "Making an issue report".
Help about how to do this can be found on IRC and in the user groups.
After there is new information, please re-open the issue by changing the status to active.
--
This issue was edited with the help of Issue Helper
Comment #5
killua99 CreditAttribution: killua99 commentedPlease open a new issue if you still have this problem.