Announcement

Collapse
No announcement yet.

Get Created Record ID

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Get Created Record ID

    Hi Everyone.

    I have this formula for creating a record. What I need to figure out is how can I get the created records id in return so I can relate to another entity

    record\create('InvoiceItem', 'name', 'TEST123', 'invoiceId', '[[I NEED TO GET THE CREATED RECORD', 'amount', fireDueCost);

  • #2
    Figured it out friends! You will find it below.

    $invoiceId=record\create(
    'Invoice',
    'dateInvoiced', datetime\now(),
    'dueDate', datetime\now(),
    'saasclientId', account.saasclientId,
    'billingAddressStreet', account.shippingAddressStreet,
    'billingAddressState', account.shippingAddressState,
    'billingAddressPostalCode', account.shippingAddressPostalCode,
    'billingAddressCity', account.shippingAddressCity,
    'billingAddressCountry', "United States"
    );
    record\create('InvoiceItem', 'name', 'FIRE DUES',
    'invoiceId', $invoiceId , 'amount', fireDueCost);

    Comment

    Working...
    X